杂
来源:互联网 发布:数据分析资讯 编辑:程序博客网 时间:2024/06/06 06:52
1、关于tableview,修改数据库中的值,不要在cell复用是调用的方法中,修改值,这个方法在界面中不显示时,是不会调用的,这种bug很危险!
2、关于array
NSArray *array = [[NSArrayalloc] initWithObjects:@"1",@"2",@"3",nil];
NSArray *array2 = [[NSArrayalloc]init];
NSArray *array3 = [array2 arrayByAddingObjectsFromArray:array];
NSLog(@"array%@-----array2%@-----array3%@",array,array2,array3);
2014-04-28 14:44:51.314 PrefsInCloud[2682:a0b] array(
1,
2,
3
)-----array2(
)-----array3(
1,
2,
3
)
方法:arrayByAddingObjectsFromArray:array
官方解释:
Returns a new array that is a copy of the receiving array with the objects contained in another array added to the end
拷贝一个接收数组的新的数组,把另一个数组的对象添加到他的末尾
2个数组合并,加到末尾,返回一个新的对象
注意点:如果程序中用xml作为传输机制,需要注意输入框中输入“”的特殊处理,针对生成的xml是用字符串拼接而成,但是如果用gdata生成,就会避免类似的问题
问:查找程序中是否调用主线程的方法
1、[nsthread ismainthread];
2、在项目中搜索
[ self performselecoronmainThread];等可以调用主线程的方法
备注:asihttprequst
@property(nonatomic,copy)RequstSuccessBlock requstSucessBlock;
@property(nonatomic,copy)RequstFailBlock requstFailedBlock;
上面这两个block块调用主线程
问:xcode 5.0.1 仅仅能安装 7.0一下的sdk,如果安装7.1sdk,需要提升xcode版本至5.1
问:对于oneVIewController present secondviewcontroller,怎样设置secondViewController 透明?
NDTSecondViewController *secondViewController = [[NDTSecondViewControlleralloc]init];
self.modalPresentationStyle =UIModalPresentationCurrentContext;
[selfpresentViewController:secondViewControlleranimated:YEScompletion:^{}];
以上方法在iphone中行的通,在ipad中行不通
问:
问:如何捕捉textfield中输入的汉字?
方法:监听textfield的事件,代码如下:
[Fristcell.firstInfoTextfieldaddTarget:selfaction:@selector(textfieldTextChange:)forControlEvents:UIControlEventEditingChanged];
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 杂
- 永远不要放弃你真正想要的东西
- vgcreate指令:创建卷组
- eclipse codetemplate
- c#:怎么让自动生成类的注释
- Node.js中所用的fs.renameSync出错:Error: EXDEV, cross-device link not permitted
- 杂
- 学习笔记——SQL SERVER2014内存数据库
- Object-C base
- JAVA框架之Spring[Spring事物详解]
- iphoe 重用机制
- 服装门店神秘顾客监测样本及频次
- mpstat使用详解
- iOS - Choose a destination with a supported architecture in order to run on this device:
- iOS中ARC的设置