属性的概念在OC1.0中就存在,格式是定义实例变量,然后定义setter和getter方法,用点操作符操作属性举例,类的接口部分 1 @interface Father : NSObject 2 { 3 NSInteger _item; 4 } 5 #pragma mark - 属性 6 -...
分类:
其他好文 时间:
2015-12-22 21:16:53
阅读次数:
223
1 - (BOOL)isBetweenFromHour:(NSInteger)fromHour toHour:(NSInteger)toHour 2 { 3 NSDate *date8 = [self getCustomDateWithHour:8]; 4 NSDate *date...
分类:
移动开发 时间:
2015-12-20 13:12:07
阅读次数:
608
1 - (NSInteger)getWeekDataWithYear:(NSString *)year month:(NSString *)month day:(NSString *)day{ 2 3 // 创建并设置NSDateComponents,它可以根据制定的时间生成对应的...
分类:
移动开发 时间:
2015-12-20 13:06:51
阅读次数:
167
NSAssert函数:1 NSAssert(condition, desc, ...);1. condition:条件,如果条件满足则程序正常之行,如果条件不满足则程序崩溃,奔溃的信息可以由后面的desc来打印出来: 实例如下: NSInteger age = 10; NSAssert...
分类:
移动开发 时间:
2015-12-19 16:19:12
阅读次数:
147
6.16UIPickerView6.16.1UIPickerViewDataSource //返回列数- (NSInteger)numberOfComponentsInPickerView:(UIPickerView*)pickerView;//返回每列的行数- (NSInteger)pick...
分类:
其他好文 时间:
2015-12-18 21:26:07
阅读次数:
192
用循环构建多视图的相关代码- (viod) viewDidLoad{ [super loadView]; UIView *view = [[[UIView alloc] init] autorelease]; self.view = view; NSInteger l...
分类:
其他好文 时间:
2015-12-18 06:43:55
阅读次数:
136
UIViewContentMode如下:typedef NS_ENUM(NSInteger, UIViewContentMode) { UIViewContentModeScaleToFill, UIViewContentModeScaleAspectFit, // contents sca...
分类:
其他好文 时间:
2015-12-15 10:26:50
阅读次数:
102
各种颜色之间的转换,会陆续更新,HEX颜色转UIColor- (UIColor*)ConvertWith:(NSInteger)RGB Alpha:(CGFloat)a{ NSInteger r = (RGB & 0xFF0000) >> 16; NSInteger G = (RGB ...
分类:
移动开发 时间:
2015-12-14 14:33:24
阅读次数:
159
慢慢吞吞的学iOS开发,也总算是有了一点进展,UI基础都过了一遍,今天回顾一下之前学的东西,做个总结//枚举//UIview的动画形成typedef NS_ENUM(NSInteger, UIViewAnimationCurve) { UIViewAnimationCurveEaseInOut, ....
分类:
其他好文 时间:
2015-12-12 20:20:11
阅读次数:
319
//新创建一个类#import typedef NS_ENUM(NSInteger, XFNoticesStyle) { XFNoticesStyleSuccess = 0, XFNoticesStyleFail = 1,};@interface XFNotices : UIV...
分类:
其他好文 时间:
2015-12-10 18:41:38
阅读次数:
129