UITableViewDataSourc(数据源代理) 1、必须实现的回调方法 返回每个分区的行数 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; 返回每一行的cell
分类:
其他好文 时间:
2016-02-20 21:31:34
阅读次数:
213
1:第三方插件SKSTableView在IOS7.1.1出现闪退的问题 解决办法,修改其内部源代码: (NSInteger)subRow { id indexpath = [NSIndexPath class]; id subRowObj = objc_getAssociatedObject(ind
分类:
移动开发 时间:
2016-02-19 14:19:42
阅读次数:
189
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(nullable UIView *)view; { U
分类:
其他好文 时间:
2016-02-17 09:26:46
阅读次数:
158
在开发项目的时候,遇到了一个问题,就是其中一个页面需要强制横屏,而其他页面要强制竖屏。 我的解决方法是这样的。在AppDelegate.h里面添加@property(nonatomic,assign)NSInteger allowRotation;在AppDelegate.m文件里面添加 1 - (
分类:
移动开发 时间:
2016-02-15 19:47:58
阅读次数:
236
NSDate *date = [NSDate date]; NSTimeZone *zone = [NSTimeZone systemTimeZone]; NSInteger interval = [zone secondsFromGMTForDate: date]; NSDate *localeD
分类:
移动开发 时间:
2016-02-01 14:29:46
阅读次数:
140
1.OC的一个枚举?答:功能:设置状态栏的样式.typedef NS_ENUM(NSInteger, UIStatusBarStyle) { UIStatusBarStyleDefault = 0, // Dark content, for use on lig...
分类:
其他好文 时间:
2016-01-26 23:28:52
阅读次数:
224
Object-C 代码分为三部分:.h文件、.m文件及调用文件.h源文件#import @interface Student:NSObject{NSString *studentName;NSInteger age;}-(void) printInfo;-(void) setStudentName:...
分类:
其他好文 时间:
2016-01-25 19:14:26
阅读次数:
165
在处理UITableView表格时,我们希望在View底部添加按钮。用户拖动UITableView时按钮能跟随移动。如题,实现如下界面:- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)...
分类:
其他好文 时间:
2016-01-25 11:07:24
阅读次数:
126
1.assignassign只是简单赋值,不更改索引计数,适用于基础数据类型 (例如NSInteger,CGFloat)和C数据类型(int, float, double, char, 等) 2.copycopy用来建立一个索引计数为1的对象,然后释放旧对象,常用语NSString ,指在赋值时.....
分类:
其他好文 时间:
2016-01-20 01:02:04
阅读次数:
208
使用assign: 对基础数据类型 (NSInteger)和C数据类型(int, float, double, char,等)使用copy: 对NSString使用retain: 对其他NSObject和其子类assign就是简单的赋值,不更改引用计数,所以直接使用基础数据copy是直接拷贝内容,成...
分类:
移动开发 时间:
2016-01-19 17:12:31
阅读次数:
198