上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: //查看是否授权了。 if ([PHPhotoLibrary authorizationStatus] != PHAuthorizationStatusAuthorized){ NSLog(@"没有授权"); } //PHAsset 可以表示一个图片的信息 相册信息 //PHFetchResult 阅读全文
posted @ 2016-03-31 21:30 王权 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 1.从系统相册中读取 /* 判断选择的读取类型是否支持 UIImagePickerControllerSourceTypePhotoLibrary,普通相册 UIImagePickerControllerSourceTypeCamera, 镜头(拍照、录视频) UIImagePickerContro 阅读全文
posted @ 2016-03-31 21:27 王权 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 常常会用到对plist文件的封装 +(NSArray *)LoadFriendsDataFromPlist:(NSString *)plistName{ NSString * filePath = [[NSBundle mainBundle]pathForResource:plistName ofT 阅读全文
posted @ 2016-03-31 21:19 王权 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 在仿写QQ会话的时候背景蓝色图片是拉伸而来,但是有些地方是受保护的不能拉伸 所以定义了下面的工具类中的一个方法,专门拉伸图片 UIImageResizingModeStretch:拉伸模式,通过拉伸UIEdgeInsets指定的矩形区域来填充图片 UIImageResizingModeTile:平铺 阅读全文
posted @ 2016-03-31 21:09 王权 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 1.简单设置带属性的字符串 定义一个NSMutableAttributedString带属性的字符串 NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"hello[1_1] wor 阅读全文
posted @ 2016-03-31 21:04 王权 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 注册消息 [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(方法) name:@"消息名字" object:nil]; 方法实现 -(void)方法:(NSNotification *)notficati 阅读全文
posted @ 2016-03-01 09:10 王权 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 创建显示的页面 SearchViewController * searchVC = [[SearchViewController alloc]init]; 告诉搜索控制器将结果显示在创建的页面上 self.searchController = [[UISearchController alloc]i 阅读全文
posted @ 2016-03-01 09:02 王权 阅读(124) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; self.myTableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, 320, 568) style:UITableViewStyleGroup 阅读全文
posted @ 2016-03-01 08:58 王权 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1.contentSize幕布实际大小决定滚动的方向,如果小于图片本身不滚动,默认也是不滚动 view.contentSize = CGSizeMake(1280, 200); 而frame只是用来显示UIScrollView的显示区域的大小用户看的到的。 2.页面效果,图片不可以停留在两张图中间 阅读全文
posted @ 2016-01-30 21:50 王权 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1.创建一个UINavigationController self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; FirstViewController * first = [[FirstViewCont 阅读全文
posted @ 2016-01-29 14:52 王权 阅读(114) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页