Ada*_* S. 53 iphone objective-c nsarray
我有NSNr的NSNrray,并希望在数组中找到最大值.这样做有内置的功能吗?我使用iOS4 GM,如果这有任何区别.
ser*_*buj 176
KVC方法如下所示:
int max = [[numbers valueForKeyPath:@"@max.intValue"] intValue];
Run Code Online (Sandbox Code Playgroud)
要么
NSNumber * max = [numbers valueForKeyPath:@"@max.intValue"];
Run Code Online (Sandbox Code Playgroud)
数字作为NSArray
| 归档时间: |
|
| 查看次数: |
32817 次 |
| 最近记录: |