//MARK:-------swift中的typedef--------------
//使用 关键字定义类型别名,类似typedef
typealias NSInteger = Int
var value : NSInteger = 45
value = 12
print(value);
//MARK:-------String--------------
let label = "The...
分类:
编程语言 时间:
2015-07-09 16:20:38
阅读次数:
446
怎么去掉Xcode工程中的某种类型的警告 Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int32问题描述在我们的项目中,通常使用了大量的第三方代码,这些代码可能很复杂,我们不敢改动他们,可是作者已...
分类:
其他好文 时间:
2015-07-09 06:18:08
阅读次数:
129
// Fraction.h#import @interface Fraction : NSObject@property (nonatomic, assign)NSInteger above;//分子@property (nonatomic, assign)NSInteger below;//分母....
分类:
其他好文 时间:
2015-07-09 00:43:09
阅读次数:
127
1.segmentedControlStyle设置segment的显示样式。typedef NS_ENUM(NSInteger, UISegmentedControlStyle) {UISegmentedControlStylePlain, // large plain 系统默认平板样式segmen...
分类:
其他好文 时间:
2015-07-08 16:24:20
阅读次数:
237
UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped里的方法:tableView处理步骤1.有多少组- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableV...
分类:
其他好文 时间:
2015-07-08 16:18:33
阅读次数:
184
1. numberOfComponents:返回UIPickerView当前的列数NSInteger num = _pickerView.numberOfComponents;NSLog( @"%d", num);2. - (NSInteger)numberOfRowsInComponent:(NS...
分类:
其他好文 时间:
2015-07-08 16:09:38
阅读次数:
98
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
从点(topCapHeight,topCapHeight)往右下角开始拉伸...
分类:
其他好文 时间:
2015-07-07 21:19:12
阅读次数:
129
+ (CGFloat)labelHeight:(UILabel *)label lines:(NSInteger)lines{ NSRange range = NSMakeRange(0, label.attributedText.length); NSDictionary *dic = [la.....
分类:
移动开发 时间:
2015-07-07 18:27:38
阅读次数:
120
1.定义block的两种方式: -直接定义: //@property (nonatomic,copy) void (^callBack)(NSInteger index,id info); -type定义,重用 typedef void (^callBack)(NSInteger i...
分类:
其他好文 时间:
2015-07-06 10:06:32
阅读次数:
115
(1)、assign是直接赋值。不会涉及引用计数问题,主要用于对objc基础数据类型(NSInteger、CGFloat等)和C基本数据类型(int 、double、float、char等)的赋值. (2)、retain是指针拷贝,使用了引用计数,对对象进行retain操作之后将使对象的引用计数+....
分类:
移动开发 时间:
2015-07-03 12:03:31
阅读次数:
104