1 拖入TableView到UIView中,连线DataSource 2 3 1.实现数据源方法 4 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 5 { 6 retu
分类:
其他好文 时间:
2016-03-05 01:36:42
阅读次数:
251
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight: (NSInteger)topCapHeight 这个函数是UIImage的一个实例函数,它的功能是创建一个内容可拉伸,而边角不拉伸的
分类:
其他好文 时间:
2016-03-02 17:45:47
阅读次数:
208
cell.textLabel.lineBreakMode =NSLineBreakByTruncatingTail;这样设置的时候,当textlabel的文本很长的时候,过长的部分显示为... //下面是不同的样式对应的效果 typedef NS_ENUM(NSInteger, NSLineBrea
分类:
其他好文 时间:
2016-03-01 22:23:01
阅读次数:
196
pthread 实现多线程操作 代码实现: void * run(void *param) { for (NSInteger i = 0; i < 1000; i++) { NSLog(@"---buttonclick---%zd---%@", i, [NSThread currentThread]
分类:
移动开发 时间:
2016-02-29 12:54:33
阅读次数:
264
UIFount有个属性可以测量高度的文本行 NSInteger numberLines = textView.contentSize.height / textView.font.lineHeight;
分类:
其他好文 时间:
2016-02-28 13:49:23
阅读次数:
137
错误代码:很明显的错误,一定要谨记. 1 - (NSInteger)giftCountFullScreen{ 2 NSArray *arr = [NSMutableArray arrayWithArray:self.arrayGiftGruop]; 3 for (id data in arr) {
分类:
其他好文 时间:
2016-02-26 12:11:29
阅读次数:
140
在OC中,为单一实例变量赋值的方法称为setter方法(设置器) 在OC中,读取实例变量值得方法称为getter方法(访问器) OC里规定了setter、 getter方法的书写格式 setter方法的书写格式如下: - (void)setAge:(NSInteger)age; 注意:set + 实
分类:
其他好文 时间:
2016-02-24 22:25:15
阅读次数:
163
1 + (UIColor *)colorWithRGB:(NSString *)rgbstr{ 2 NSString *newrgbstr = [rgbstr uppercaseString]; 3 NSInteger strlen = newrgbstr.length; 4 UIColor *co
分类:
其他好文 时间:
2016-02-23 13:09:27
阅读次数:
119
这两天发现app的一个崩溃,提示是 *** Collection <CALayerArray: 0x18904630> was mutated while being enumerated. 找了一天终于找到了罪魁祸首,代码是这样的 for (NSInteger i = 0; i < postArr
分类:
编程语言 时间:
2016-02-22 19:03:23
阅读次数:
245
#import <UIKit/UIKit.h> @interface ELCUIApplication : UIApplication { NSTimer *_idleTimer; NSInteger timeCount; } @end #import "ELCUIApplication.h" @i
分类:
移动开发 时间:
2016-02-22 17:35:37
阅读次数:
199