Emi*_*mil 2 arrays iphone xcode loops objective-c
你怎么能做这个工作?
numbers = [[NSMutableArray alloc] initWithObjects: ({int x = 0; while (x <= 60 ) { return x; x++; } })];
Run Code Online (Sandbox Code Playgroud)
谢谢 :)
NSMutableArray * array = [[NSMutableArray alloc] init];
for (int i = 0; i <= 60; ++i) {
[array addObject:[NSNumber numberWithInt:i]];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4813 次 |
| 最近记录: |