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