UISegment分段控制属性1.segmentedControlStyle设置segment的显示样式。typedefNS_ENUM(NSInteger, UISegmentedControlStyle) {UISegmentedControlStylePlain,// large plain系统...
分类:
其他好文 时间:
2015-08-28 19:25:12
阅读次数:
101
UIPikerView的属性1.numberOfComponents:返回UIPickerView当前的列数NSIntegernum =_pickerView.numberOfComponents;NSLog(@"%d", num);2. - (NSInteger)numberOfRowsInCom...
分类:
其他好文 时间:
2015-08-28 19:22:39
阅读次数:
135
UITableView内置了两种样式:UITableViewStylePlain,UITableViewStyleGrouped协议##UITAbleeViewDataSource协议//调用数据源的下面方法得知一共有多少组数据- (NSInteger)numberOfSectionsInTable...
分类:
其他好文 时间:
2015-08-28 19:03:01
阅读次数:
137
NSCalendar * calendar = [NSCalendar
currentCalendar];
NSDate * currentDate = [NSDate
date];
NSInteger week = [calendar
ordinalityOfUnit:NSCalendarUnitWeekday
inUnit:NSCalendarUnitYea...
分类:
其他好文 时间:
2015-08-28 13:21:09
阅读次数:
126
strong与weak是由ARC新引入的对象变量属性
xcode 4.2(ios sdk4.3和以下版本)和之前的版本使用的是retain和assign,是不支持ARC的。xcode 4.3(ios5和以上版本)之后就有了ARC,并且开始使用
strong与weak
assign: 用于非指针变量。用于
基础数据类型 (例如NSInteger)和C数据类型(int,...
分类:
其他好文 时间:
2015-08-27 13:28:18
阅读次数:
188
会自动生成frame,可以设置其中心点center 来布局 @property(nonatomic) NSInteger numberOfPages;????????? @property(nonatomic) NSInteger currentPage; 设置页数通过numberOfPages属性设置, curren...
分类:
其他好文 时间:
2015-08-27 11:23:27
阅读次数:
147
/**
* 将阿拉伯数字转换为中文数字
*/
+(NSString *)translationArabicNum:(NSInteger)arabicNum
{
NSString *arabicNumStr = [NSString stringWithFormat:@"%ld",(long)arabicNum];
NSArray *arabicNumeralsArray = @...
分类:
移动开发 时间:
2015-08-26 13:57:50
阅读次数:
208
文本的水平对齐方式 NSTextAlignment UITextField,UILabel等带有文字的控件 NSTextAlignmentLeft 左对齐 NSTextAlignmentRight 右对齐 NSTextAlignmentCenter居中 typedef?NS_ENUM(NSInteger,?NSTextAlignment...
分类:
其他好文 时间:
2015-08-25 12:57:40
阅读次数:
126
//设置行高
- (CGFloat)tableView:(UITableView )tableView heightForRowAtIndexPath:(NSIndexPath )indexPath{return 80;
}
//分区
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Ret...
分类:
其他好文 时间:
2015-08-21 15:37:52
阅读次数:
87
加速计是整个IOS屏幕旋转的基础,依赖加速计,设备才可以判断出当前的设备方向,IOS系统共定义了以下七种设备方向:
typedef NS_ENUM(NSInteger, UIDeviceOrientation) {
UIDeviceOrientationUnknown,
UIDeviceOrientationPortrait, // Device o...
分类:
移动开发 时间:
2015-08-20 15:20:17
阅读次数:
262