记笔记。。。
初始化 - (id)initWithImage:(UIImage *)image;
图片可以用来做序列帧动画 (1帧1帧展示 )主要用到一下集中方法
@property(nonatomic,copy) NSArray *animationImages; 数组中放的是UIImage对象
@property(nonatomic) NSInteger an...
分类:
其他好文 时间:
2014-11-25 23:42:17
阅读次数:
182
Look,这是一个很简单的要求,点击Add me,age +1.想一想的话很简单的,设置一个属性Nsinteger age,点击button add me,直接加1在重新显示Lable就好啦,不过,我们今天是来练习KVC和KVO的,苹果的键值编程哈哈首先我们定义一个Human的类,并且完成了它的初始...
分类:
其他好文 时间:
2014-11-25 20:15:47
阅读次数:
183
在做项目的过程中,我遇到这样一个问题,就是本身的tableview 调用
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
方法的时候,最后几个位置点击后不能准确定位,比如说“#” 不管我如何点击“#”都无法把其对应的列表项显示出来,所以我自己在
- (NSInteger) tableView:(UI...
分类:
移动开发 时间:
2014-11-25 14:27:01
阅读次数:
237
1.概念NSArray,NSDictionary只能放OC对象,不能放入基本数据类型必须使用包装类NSNumber,把基本数据类型包装成OC对象不支持自动包装解包 1 void number() 2 { 3 NSNumber *number = [NSNumber numberWithInt...
分类:
其他好文 时间:
2014-11-24 20:42:15
阅读次数:
239
#pragma mark - Table View//设置section的个数- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1;}//设置每个section 的行数- (NSInteger)tab...
分类:
移动开发 时间:
2014-11-24 13:16:44
阅读次数:
169
IOS5.0之前- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;IOS5.0CGFloat top = 25; // 顶端盖高度CGF...
分类:
移动开发 时间:
2014-11-24 11:38:10
阅读次数:
188
在UItableView中使用代理方发-(UIView*)tableView:(UITableView*)tableViewviewForHeaderInSection:(NSInteger)section时,使用UIView自定义的header,发现不能重用,后来发现要想重用必须使用 UITabl...
分类:
其他好文 时间:
2014-11-23 15:39:24
阅读次数:
187
Objective-C 2.0从2006年正式发布至今已经有8年了。Apple在此期间也不断地为其注入新的语法特性,比如Blocks、NSNumber literal、NSNumber literal、NSArray literal、NSDictionary literal、Object subsc...
分类:
其他好文 时间:
2014-11-23 01:54:59
阅读次数:
193
名词翻译: 语法糖(syntactic sugar):是指计算机语言中与另外一套语法等效,但是开发者用起来却更加方便的语法。 语法糖可令程序更易读,减少代码出错机率。字面数值 NSNumber *number = @1;字面量数组 NSArray = @[]; @[下标]; //下标...
分类:
其他好文 时间:
2014-11-22 00:39:14
阅读次数:
181
第一种typedef void(^SDWebImageDownloaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize);@interface ssyTest : NSObject{ SDWebImageDownlo...
分类:
其他好文 时间:
2014-11-21 18:09:00
阅读次数:
178