逆风飞行
dsr_22 · 共 114 篇文章
With OS X EI Capitan, there is a new security function that prevents you from mo
resolved reason:With OS X EI Capitan, there is a new security function that prevents you from modifying system files called Rootless 1. sudo gem install -n /usr/local/bin fastlane or 2.disable rootless function and install gems after the reboot using: sudo nvram boot-args="rootless=0"; sudo reboot
2016-04-14 13:50 · ios · 评论(0)
Error installing frameit on OSX El Capitan 10.11
这么重要的信息。。。找了好久 妈蛋! When run sudo gem install frameit on OSX El Capitan 10.11 and the system show this error ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/comander Issue Solution The solution is run the next command sudo gem install -n /usr/local/bin frameit
2016-04-14 13:42 · ios · 评论(0)
blog 收藏
contentSize是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。 contentOffset是scrollview当前显示区域顶点相对于frame顶点的偏移量,比如上个例子你拉到最下面,contentoffset就是(0 ,480),也就是y偏移了480 contentInset是scrollview的contentview的顶点相对于scrollview的位置,例如你的contentInset = (0 ,100),那…
2015-11-14 22:55 · ios · 评论(0)
创建自己的framework
我们在做app或者做项目的时候经常用其它的类库 比如 uikit啦 corelocation 之类,只能看到里面的.h文件,.m文件是看不到的。怎么创建自己的类库呢,今天就来学习做一个吧。 首先就是打开xcode创建一个framework了 目录结构就是如上图所示了 然后去build settings 把类型改成静态的类库 紧接着 开始写 MyUtils.h 和 MyUtils.m文件 MyUtils.h #import <Foundation/Foundation.h> @interface MyUtils : NSObject -(void)log:(NSString *)message…
2015-11-12 17:38 · ios · 评论(0)
objective-c 变量前加下划线"_"是什么意思?
objective-c 变量前加下划线"_"是什么意思? 作者:王涛 链接:http://www.zhihu.com/question/26605346/answer/33392620 来源:知乎 这是苹果的编程规范(也说不上规范,就是算是习惯吧),声明的property如果没有特意指定synthesize的话,那么Objective-C就会自动的给你声明一个_开头的实例变量。 例如声明了一个叫param的property @property (nonatomic, copy)NSString *param; 通过_param进行存取的话是不会调用该变量的setter或者getter方法的,…
2015-11-12 12:05 · ios · 评论(0)
超全!iOS 面试题汇总
http://www.cocoachina.com/programmer/20151019/13746.html
2015-11-02 23:15 · ios · 评论(0)
Xcode 7遇到 App Transport Security has blocked a cleartext HTTP 错误
今天用Xcode 7 创建新项目用到 URL 发送请求时,报下面的错: “App Transport Security has blocked a cleartext HTTP ( http:// ) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file” 找查资料后发现,新特性要求App内访问网络请求,要采用 HTTPS 协议。 但是我获取的图片地址都是HTTP协议,经过百度和Google 的赞助最终找到以下解决办法: 在Info.p…
2015-11-02 22:19 · ios · 评论(0)
使用MFMailComposeViewController发送邮件时防止崩溃
MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init]; if (!mailViewController) { // 在设备还没有添加邮件账户的时候mailViewController为空,下面的present view controller会导致程序崩溃,这里要作出判断 NSLog(@"设备还没有添加邮件账户"); }
2015-11-02 11:37 · ios · 评论(0)
NSKeyedUnarchiver 和 NSKeyedarchiver
NSKeyedUnarchiver 和 NSKeyedarchiver ( 加密形式 )归档 的储存方式 用 archiveRootObject 进行简单的归档 //=================NSKeyedArchiver======================== NSString *saveStr1 = @"我是"; NSString *saveStr2 = @"数据"; NSArray *array = [NSArray arrayWithObjects:saveStr1, saveStr2, nil]; //----Save //这一句是将路径和文件名合成文件完整路径 N…
2015-10-13 12:21 · ios · 评论(0)
automaticallyAdjustsScrollViewInsets(个人认为iOS7中略坑爹的属性)
擦 还有那么坑的属性 我布局在scrollview中的tableView会乱跑,原来是这个问题,一般来说就是,如果你要隐藏什么statusbar navigationbar之类的就把这属性设为NO; @当我们在一个UIViewController中同时创建2个tableView的时候,如果把它们的frame中的Y坐标设置为一样,你可能会发现它们的位置并没有达到你想要的结果.比如第一tableView个frame(0,0,320,568),另一个也frame(0,0,320,568),结果会发现第二个tableView的第一行数据被导航栏遮挡了,以至于我们不得已把第二个frame改成(0,64…
2015-09-29 18:05 · ios · 评论(0)
iOS 关于屏幕旋转shouldAutorotate
http://www.jianshu.com/p/73be6d0e152f http://blog.csdn.net/yiyaaixuexi/article/details/8035014
2015-09-07 12:49 · ios · 评论(0)
afnetworking 提交表单数据
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager.requestSerializer setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; afnetworking 提交表单数据时要使用 application/x-www-form-urlencoded
2015-08-17 18:14 · ios · 评论(0)
自定义 navigationbar的 title
UIView *titleView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 100, 44)]; UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 44)]; titleLabel.text = @"Exercise"; titleLabel.textColor = [UIColor whiteColor]; [titleLabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:18…
2015-08-06 16:59 · ios · 评论(0)
转 IOS开发中(null)与<null>的处理
不小心在开发过程中,得到了(null)以及<null>的返回值,找了好长时间只找到了一个关于<null>的。 由于要根据返回值进行判断,做出必要反应,因此必须知道返回值所代表的具体字符,在得到(null)后利用isEqual:和@“”,NULL,@“(null)”,nil,Nil比较后均得不到正确结果,弄得不知所措了,但是还是感觉像nil,不得已,创建一个字符串,赋值为nil,打印输出,果然是(null),想不通的是为什么不等。最后试了一下“==”,成功了。费尽周折之后才明白原来要这样用: if(m_result==nil) { NSLog(@"KDA!"); } 还有就是<null>,从网…
2015-06-05 16:04 · ios · 评论(0)