2
我不明白爲什麼,如果我寫的這些代碼ALLOC initWithObjects VS arrayWithObject
icons = [[NSArray alloc] initWithObjects:
@"appointment",
@"work",
@"anniversary",
@"me",
nil];
應用程序崩潰。但後來我用這些代碼替換了
icons = [NSArray alloc] arrayWithObjects:
@"appointment",
@"work",
@"anniversary",
@"me",
nil];
並且該應用沒有崩潰。 但這些方法之間有相同的影響! 我不知道爲什麼?你能幫我嗎 ?
http://stackoverflow.com/questions/5155097/ipad-large-nsarray-initwithobjects-vs-arraywithobjects – 2013-02-18 09:10:36
提供了一些更多的代碼和崩潰日誌。 – 2013-02-18 09:12:03
Plz檢查這個http://stackoverflow.com/questions/6744468/what-is-the-difference-between-arraywithobjects-and-initwithobjects – HRM 2013-02-18 09:28:09