typedef NS_ENUM(NSInteger, UIDeviceOrientation)//设备方向{ UIDeviceOrientationUnknown, UIDeviceOrientationPortrait, // 竖向,头向上 UIDeviceOrientati...
分类:
其他好文 时间:
2015-06-04 18:53:37
阅读次数:
82
UIButton 风格typedef NS_ENUM(NSInteger, UIButtonType) {
UIButtonTypeCustom = 0, // no button type
UIButtonTypeSystem NS_ENUM_AVAILABLE_IOS(7_0), // standard system button...
分类:
移动开发 时间:
2015-06-02 21:54:58
阅读次数:
454
NSMutableArray 是一个可变数组,是NSArray的子类,但是不可以添加空值 创建NSMutableArray的方法 +(id)arrarWithCapacity:(NSInteger)numItems -(id)initWithCapacity:(NSInteger)numItems ...
分类:
其他好文 时间:
2015-06-02 19:27:18
阅读次数:
137
- (NSString *)calculateWeek:(NSDate *)date{
//计算week数
NSCalendar * myCalendar = [NSCalendar currentCalendar];
myCalendar.timeZone = [NSTimeZone systemTimeZone];
NSInteger week = [[myCa...
分类:
移动开发 时间:
2015-06-02 13:28:40
阅读次数:
137
// strong : 一般对象// weak : UI控件//assign:用于非指针变量。用于基础数据类型(例如NSInteger)和C数据类型(int,float,double,char)另外还有id反正记住:前面不需要加“*”的就用assign吧,weak就是相当于assign实例如下:@p...
分类:
其他好文 时间:
2015-06-02 10:42:32
阅读次数:
109
要让 UITableViewController 实现 UITableViewDataSource 协议,需要实现以下方法:1. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;指定section数所谓的sectio...
分类:
其他好文 时间:
2015-05-31 10:40:55
阅读次数:
94
=-= 命名有些错误,但功能实现,以后注意下命名规范WJViewGroup.h#import @interface WJViewGroup : UIView { NSInteger _width; NSInteger _height;}@property (nonatomic,assig...
分类:
移动开发 时间:
2015-05-30 17:53:39
阅读次数:
167
千万别小看UI中得线,否则你的设计师和测试组会无休止地来找你的!!(如果是美女还好,如果是恐龙。。。。)在开发中运用最多的是什么,对,表格--TableView,之所以称作表格,是因为他天生带有分割线。首先系统带的有如下类型:typedef NS_ENUM(NSInteger, UITableVie...
分类:
移动开发 时间:
2015-05-29 17:07:48
阅读次数:
216
其实上一篇文章用递归实现了整数的正序输出,思考了整数还是可以逆序输出,不过大同小异,没有太多差别:正序输出-(void)printOutNumber:(NSInteger)number{ //取整,不断的递归取整,之后取余 if (number>10) { [self pr...
分类:
编程语言 时间:
2015-05-28 21:12:12
阅读次数:
204
递归是一个很经典的算法,最常见的就是斐波那契数列,斐波那契数列指的是这样一个数列:0、1、1、2、3、5、8、13、21、……在数学上,斐波纳契数列以如下被以递归的方法定义:F0=0,F1=1,Fn=F(n-1)+F(n-2)(n>=2,n∈N*),最简单的解法就是通过递归:-(NSInteger)...
分类:
编程语言 时间:
2015-05-28 15:39:03
阅读次数:
143