0
嗨,我想把這個功能。iPhone功能,交換陣列
NSMutableArray* weekArray = [[NSMutableArray alloc] init];
[weekArray addObject:@"Before School"];
[weekArray addObject:[NSString stringWithFormat:@""]];
[weekArray addObject:[NSString stringWithFormat:@""]];
[weekArray addObject:@"Break"];
[weekArray addObject:[NSString stringWithFormat:@""]];
[weekArray addObject:[NSString stringWithFormat:@""]];
[weekArray addObject:@"Lunch"];
[weekArray addObject:[NSString stringWithFormat:@""]];
[weekArray addObject:[NSString stringWithFormat:@""]];
[weekArray addObject:@"After School"];
return weekArray;
我希望能夠把它和調用時,與陣列我選擇更換weekArray。可能?
你能改說/澄清你在問什麼嗎? – kubi 2010-09-13 20:08:14
這不是一個問題,在我看來,與以前發佈的問題沒有什麼不同,已經得到了解答:http://stackoverflow.com/questions/3677488/compress-this-into-a-function – jlehr 2010-09-13 20:12:29
@ jlehr:這裏OP想用一個數組作爲參數,而不是六個對象作爲參數。 – BoltClock 2010-09-13 20:14:53