码迷,mamicode.com
首页 >  
搜索关键字:nsarray    ( 1675个结果
各种数值
NSArray和NSDictionary只能存储对象,而不能直接存储任何基本类型的数据,如int,float或struct.但是你可以用对象来封装基本数值。例如,将int型封装到一个对象中,然后就可以将这个对象放入NSArray或NSDictionary中了。通常将一个基本类型的数据包装成对象叫做装...
分类:其他好文   时间:2015-03-08 20:01:33    阅读次数:125
数据处理
1.从plist文件中读取数据到数组@interface HMViewController ()@property (nonatomic, strong) NSArray *apps;@end@implementation HMViewController//懒加载- (NSArray *)apps...
分类:其他好文   时间:2015-03-06 21:56:37    阅读次数:173
获取网络状态,区分2G3G4GWIFI等,非reachability
+(NSString *)getNetWorkStates{ UIApplication *app = [UIApplication sharedApplication]; NSArray *children = [[[app valueForKeyPath:@"statusBar"]valueFo...
分类:其他好文   时间:2015-03-05 18:45:08    阅读次数:156
ios 实例类的变量 赋值失败
多次遇到类似问题目前只找到原因,在此记录。找到解决方案时,再补充添加。问题描述:声明类A,类B,主类M.在类A中声明一个变量数组testArray;@property (nonatomic, strong) NSArray *testArray;在主类M中实例化类A,并添加视图;A *a = [ [...
分类:移动开发   时间:2015-03-05 10:37:49    阅读次数:153
iOS获取当前路由信息
导入头文件:#import - (void)currentWifiSSID { // Does not work on the simulator. NSArray *ifs = (__bridge id)CNCopySupportedInterfaces(); NSLog(@"ifs:%@",if...
分类:移动开发   时间:2015-03-04 18:57:17    阅读次数:143
OC-Day4____数组与字典
2015.3.3#import int main(int argc, const char * argv[]) { @autoreleasepool { //利用i值遍历数组 NSArray *array = [NSArray arrayWithObjects:@"one",@"two...
分类:编程语言   时间:2015-03-03 20:34:04    阅读次数:202
NSThread 多线程相关
1.下面的代码,有2点需要注意,1>就是 就是thread:所传得参数,这里传得的是nsarray 当然也可以传其他的类型。2>[self performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:YES]....
分类:编程语言   时间:2015-03-03 20:23:41    阅读次数:180
OC-NSArray-NSMutableArray-数组-可变数组
OC-NSArray-NSMutableArray-数组-可变数组1,OC语言和c语言的数组区别 oc语言的数组只能存储对象指针,不能存储基本类型2,数组的创建 (1),initWithObjects: initWithObject (2)@[@"jack"...]; (2),init...
分类:编程语言   时间:2015-03-02 22:25:27    阅读次数:326
OC-Day3____数组
2015.3.2//数组//NSArray(不可变数组)//数组:对象地址的有序集合//int main(int argc, const char * argv[]) { @autoreleasepool { NSNumber *num1 = [NSNumber numberWithInt:...
分类:编程语言   时间:2015-03-02 22:14:36    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!