随笔分类 -  iOS

摘要:locationCollation = [UILocalizedIndexedCollation currentCollation]; //获取section标题 A-Z# array_collation_title =[[NSMutableArray alloc]initWithArray:[lo 阅读全文
posted @ 2016-05-27 14:39 爱生活爱代码 阅读(684) 评论(0) 推荐(0)
摘要:-(void)animationWithCell:(WaterLevelCollectionCell *)cell{ // 添加摇晃动画 { CAKeyframeAnimation *frame=[CAKeyframeAnimation animation]; CGFloat left=-M_PI_2*0.125; CGFloat r... 阅读全文
posted @ 2016-05-09 11:16 爱生活爱代码 阅读(309) 评论(0) 推荐(0)
摘要:1.截取选中view的图片 2.两张图片 合成一张图片 阅读全文
posted @ 2016-05-09 11:15 爱生活爱代码 阅读(345) 评论(0) 推荐(0)
摘要:升级了7.3,真心的不好用啊,bug一堆,写个代码,引入的类根本找不到,必须要command+b 重新编译一遍,现在连提交appstore都有问题。 果断用了 Application Loader上传app程序 提示:如果您安装了XCode开发环境。在/Applications/XCode.app/ 阅读全文
posted @ 2016-04-15 11:00 爱生活爱代码 阅读(2629) 评论(0) 推荐(0)
摘要:{ CAKeyframeAnimation *frame=[CAKeyframeAnimation animation]; CGFloat left=-M_PI_2*0.125; CGFloat right=M_PI_2*0.125; frame.keyPath=@"postion"; frame. 阅读全文
posted @ 2016-04-11 15:10 爱生活爱代码 阅读(349) 评论(0) 推荐(0)
摘要:网上找了一个,一般来说 有两种方法: 1.改变view 的Frame [cell setFrame:CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)] 2.改变中心点坐标: [cell se 阅读全文
posted @ 2016-04-11 15:03 爱生活爱代码 阅读(1804) 评论(0) 推荐(0)
摘要:说一下系统的button,image 和 title的位置关系 默认image 和 title的位置关系: 随便画了草图,有点丑,不过不妨碍理解: 第一种:在button上只设置文字,这个时候,button的文字默认是剧中的。 第二种:在button上只设置图片,也是默认剧中的。 第三种:主要说的是 阅读全文
posted @ 2016-04-09 22:13 爱生活爱代码 阅读(1641) 评论(0) 推荐(0)
摘要:#define NUMBERS @"0123456789.-" //数字 #define NUM @"0123456789" //字母 #define ALPHA @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" //数字和字母 #def 阅读全文
posted @ 2016-04-08 12:44 爱生活爱代码 阅读(1920) 评论(0) 推荐(0)
摘要:compare 是 NSString 中的一个方法,这个方法是将字符串 按照 ACSII码表来进行对比。 会返回三种类型: 阅读全文
posted @ 2016-03-30 18:20 爱生活爱代码 阅读(506) 评论(0) 推荐(0)
摘要:转载自:http://blog.csdn.net/h1101723183/article/details/50667325 IOS开发证书全部变成无效,如下图 打包提示错误 解决方法: 1. 下载https://developer.apple.com/certificationauthority/A 阅读全文
posted @ 2016-02-17 10:25 爱生活爱代码 阅读(181) 评论(0) 推荐(0)
摘要:1.判断用户是否有权限访问相册 #import <AssetsLibrary/AssetsLibrary.h> ALAuthorizationStatus author = [ALAssetsLibraryauthorizationStatus]; if (author == kCLAuthoriz 阅读全文
posted @ 2016-01-27 17:25 爱生活爱代码 阅读(5490) 评论(0) 推荐(0)
摘要:#pragma mark - 设置录制的音频文件的位置- (NSString *)audioRecordingPath{ NSString *str_date=[TimeTransform DateToStringWithFormat:[NSDate date] withFormatStri... 阅读全文
posted @ 2015-12-28 14:37 爱生活爱代码 阅读(950) 评论(0) 推荐(0)
摘要:if (IOS8) { UIAlertController *alertController=[UIAlertController alertControllerWithTitle:CustomLocalizedString(@"SetIp", nil) message:@""... 阅读全文
posted @ 2015-12-14 12:31 爱生活爱代码 阅读(3037) 评论(0) 推荐(0)
摘要:当初作为第一个吃螃蟹的人,第一天就把xcode升级到了xcode7,结果报了一堆错,网上也没有解决方案,于是果断退到xcode6。这两天看时机成熟,升到了xcode7,在升级后,会有许多问题,在此罗列了常出现的。1.在info.plist的NSAppTransportSecurity下新增NSAll... 阅读全文
posted @ 2015-12-08 17:51 爱生活爱代码 阅读(440) 评论(0) 推荐(0)
摘要:在iOS7中,新增加了一个小小的功能,也就是这个:self.navigationController.interactivePopGestureRecognizer.enabled = YES; 阅读全文
posted @ 2015-12-02 16:42 爱生活爱代码 阅读(702) 评论(0) 推荐(0)
摘要:iOS的界面堆栈管理比android的要好用很多。这里写两点:一点是 如何重回前面的vc,而不是push一个alloc的新界面。第二点就是判断当前堆栈显示的vc是何vc。vc堆栈:vc1->vc2->vc3->vc4->vc5vc1是底层的堆栈,push到vc2,vc2在push到vc3,vc3在p... 阅读全文
posted @ 2015-11-25 16:13 爱生活爱代码 阅读(1364) 评论(0) 推荐(0)
摘要:类似这种效果:其实很简单,利用tableview 的plain属性,然后使用section,其实滑上去不动的是 section的headView.-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return 3... 阅读全文
posted @ 2015-10-30 14:24 爱生活爱代码 阅读(505) 评论(0) 推荐(0)
摘要:5、需要在工程中创建一个Podfile文件,使用命令:$cd /Users/shiyunlei/Desktop/CocoapodsSample(进入工程目录,cd后面的是工程的路径)$touchPodfile(创建Podfile文件)然后使用vim编辑Podfile文件,使用命令:$vimPodfi... 阅读全文
posted @ 2015-10-26 12:03 爱生活爱代码 阅读(185) 评论(0) 推荐(0)
摘要:转载自:http://www.cnblogs.com/bandy/archive/2012/04/25/2469369.html- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NS... 阅读全文
posted @ 2015-09-21 10:03 爱生活爱代码 阅读(468) 评论(0) 推荐(0)
摘要:UIView触摸事件touchBegin等一系列方法 1)手指按下 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 2)按下并移动 - (void)touchesMoved:(NSSet *)... 阅读全文
posted @ 2015-09-21 09:56 爱生活爱代码 阅读(1370) 评论(0) 推荐(0)