http://blog.csdn.net/kingsley_cxz/article/details/9123959 1.UITableView的datasource实现: //回调获取每个section中的cell的行数- (NSInteger)tableView:(UITableView *)ta ...
分类:
其他好文 时间:
2016-07-12 17:20:20
阅读次数:
144
一、获取IOS所有字体名字 NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; NSArray *fontNames; NSInteger indFamily, indFont; for (indF ...
分类:
移动开发 时间:
2016-07-12 15:15:30
阅读次数:
426
分享一下,在工作工程中遇到的一些不留心的地方: 1.当需要使用int类型的变量的时候,可以像写C的程序一样,用int,也可以用NSInteger,但更推荐使用NSInteger,因为这样就不用考虑设备是32位的还是64位的。2.NSUInteger是无符号的,即没有负数,NSInteger是有符号的 ...
分类:
移动开发 时间:
2016-07-06 17:58:28
阅读次数:
158
NSMutableArray *array = [[NSMutableArray alloc] init]; NSInteger num = 7; NSNumber *number = [NSNumber numberWithInt:num]; [array addObject:number]; N ...
分类:
移动开发 时间:
2016-07-02 15:55:53
阅读次数:
200
iOS开发多线程篇—NSOperation基本操作 一、并发数 (1)并发数:同时执?行的任务数.比如,同时开3个线程执行3个任务,并发数就是3 (2)最大并发数:同一时间最多只能执行的任务的个数。 (3)最?大并发数的相关?方法 - (NSInteger)maxConcurrentOperatio ...
分类:
移动开发 时间:
2016-06-30 23:13:17
阅读次数:
304
这是该系列的第一篇,我想讨论的是:类的成员变量应该如何定义? 在 Objective-C 的语言的早期,类的私有成员变量是只能定义在 .h 的头文件里面的。像如下这样: @interface ViewController : UIViewController { @private NSInteger ...
分类:
移动开发 时间:
2016-06-30 08:35:43
阅读次数:
291
UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped 里的方法: tableView处理步骤 #pragma mark 1.有多少组 - (NSInteger)numberOfSectionsInTableView:(UIT ...
分类:
其他好文 时间:
2016-06-29 18:36:49
阅读次数:
168
作用:通常与UIScrollView连用,提示用户当前显示的页数
常用属性和方法
// 共有几个分页“圆圈”
@property(nonatomic) NSInteger numberOfPages;
// 显示当前的页
@property(nonatomic) NSInteger currentPage;
// 只存在一页时,是否隐藏,默认为YES
@propert...
分类:
移动开发 时间:
2016-06-28 12:59:19
阅读次数:
181
一.首先创建模型类 User.h #import <Foundation/Foundation.h> @interface User : NSObject @property(nonatomic,assign)NSInteger ids; @property(nonatomic,strong)NSS ...
分类:
数据库 时间:
2016-06-20 00:42:55
阅读次数:
261
typedef NS_ENUM(NSInteger, UIDeviceOrientation) //设备方向 { UIDeviceOrientationUnknown, UIDeviceOrientationPortrait, // 竖向,头向上 UIDeviceOrientationPortrai ...
分类:
其他好文 时间:
2016-06-16 17:43:34
阅读次数:
230