06 2015 档案
摘要://计算字符串高度的方法-(CGFloat)stringHeight:(NSString *)str{ //设置字符串的属性 NSDictionary *dic=@{NSFontAttributeName:[UIFont systemFontOfSize:17]}; //计算字符串的区域 CGRec...
阅读全文
摘要:1创建关于人信息的数据源person.plist2 创建一个person类3 控制器中创建一个person数组,接收数据存放person-(NSArray *)person{ if(_person==nil){ //1获取plist的全路径 NSString *filepath=[[NSBundle...
阅读全文
摘要:UIScrollView和UIPageControl 一般配合使用//创建一个滑动/滚动的视图,大小和当前视图大小一样(可以自定义大小) UIScrollView *scrollView=[[UIScrollView alloc] initWithFrame:self.view.bounds]; /...
阅读全文
摘要://1 数组的创建 NSArray *array=[[NSArray alloc] initWithObjects:@"1",@"2",@"3", nil]; NSArray *array1=[[NSArray alloc] initWithArray:array]; NSArray *array2...
阅读全文
摘要://字符串的创建 NSString *str1=@"hello world , are you ok"; NSString *string1=[NSString stringWithFormat:@"%@",@"hello"]; NSLog(@"%@",string1); //1 length 侧...
阅读全文

浙公网安备 33010602011771号