11 2014 档案
摘要:1.新建一个继承自UITableViewCell的类2.重写initWithStyle:reuseIdentifier:方法Ø添加所有需要显示的子控件(不需要设置子控件的数据和frame, 子控件要添加到contentView中)Ø进行子控件一次性的属性设置(有些属性只需要设置一次, 比如字体\固定...
阅读全文
摘要:initWithStyle里添加子控件自定义cell要加载在contentView里
阅读全文
摘要:pageControl自带有个功能,点击页码的点时会变把pageControl的enable去掉就行,或者把 user interface enable去掉
阅读全文
摘要:1[self.groups valueForKeyPath:@"name"]指groups 是一组group对象的数据,group对象里name的属性那么上面的意思就是返回每个group对象里name属性的值[group valueForKey:@"name"] 指是返回这个group对象里的nam...
阅读全文
摘要:客户端连接redis-cli -p 28903查询所有Keykeys *get list 会有如下报错(error) WRONGTYPE Operation against a key holding the wrong kind of value用sort key alpha
阅读全文
摘要:curl命令通过-H '...' -H '...'这样增加多个头例如:curl -H 'content-type: text/xml' -H 'Authorization:OMPAUTH realm="OMP",appid="11110000000100018010",pid="00000",cha...
阅读全文
摘要:[self.view insertSubview:uiview atIndex:no];把子控件按第几个顺序插到父控件里
阅读全文
摘要:常用示例:0 0 12 * * ? 每天12点触发0 15 10 ? * * 每天10点15分触发0 15 10 * * ? 每天10点15分触发0 15 10 * * ? * 每天10点15分触发0 15 10 * * ? 2005 2005年每天10点15分触发0 * 14 * * ? 每天下午...
阅读全文
摘要:1、实现监听的思想,对象A可以监听对象B状态 2、通知的思想,对一个对象A的状态发生改变时就会通知对象B知道
阅读全文
摘要:1、block的功能是实现代码的回调,简单高效[UIView animateWithDuration:1.0 animations:^{ //需要执行的代码 self.cover.alpha = 0.0; self.imageBtn.frame = CGRectMake(85, 8...
阅读全文
摘要:1、先判断数组是否为空,为空再说明已经加载过,不为空则未加载- (NSArray *) questions{ if (_questions == nil) { //1.加载plist NSArray *dictArray = [NSArray arrayWithContentsO...
阅读全文
摘要:- (instancetype) initWithDict:(NSDictionary *)dict{ if (self = [super init]) { self.answer = dict[@"answer"]; self.title = dict[@"title"]; ...
阅读全文
摘要:方法1NSArray *objs = [[NSBundle mainBundle] loadNibNamed:@"WNHAppView" owner:nil options:nil];这个方法会创建xib中的所有对象,并且将对象按顺序放到objs数组里方法2UINib *nib = [UINib n...
阅读全文
摘要:今天学习九宫格应用信息展示时,点击按钮没反应,检查了很久按钮的创建代码还是找不出问题后来通过对比了每一行的代码才发现问题所在流程是这样的:1、通过创建一个view UIImageView *appView =[[UIImageView alloc] init]; ...... [self.view ...
阅读全文
摘要:1、NSBundle一个NSBundle代表一个文件 夹,利用NSBundle能访问对应的文件 夹利用mainBunle就可以访问软件资源包中的任何资源模拟器应用程序的安装路径/user/aplle/资源库/application support/iphone simulator/7.1/appli...
阅读全文
摘要:1、UIImageView动画帧的使用通过加载UIImage序列的图片数据,然后设定个时间实现动画播放2、UIImage的两种加载方式 UIImage imageName:fileName -----有缓存 UIImageimageWithContentsOfFile:path -----没有缓...
阅读全文

浙公网安备 33010602011771号