`
文章列表
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 or2.disable rootless function and install gems after the reboot using:sudo nvram boot-args="rootless=0"; sudo ...
这么重要的信息。。。找了好久  妈蛋!      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 ...
      http://www.tuicool.com/articles/vIbMry

blog 收藏

    博客分类:
  • ios
contentSize是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。contentOffset是scrollview当前显示区域顶点相对于frame顶点的偏移量,比如上个例子你拉到最下面,contentoffset就是(0 ,480),也就是y偏移了480contentInset是scrollview的contentview的顶点相对于scrollview的位置,例如你的contentInset = (0 ,100),那么你的 ...

创建自己的framework

    博客分类:
  • ios
我们在做app或者做项目的时候经常用其它的类库 比如 uikit啦   corelocation 之类,只能看到里面的.h文件,.m文件是看不到的。怎么创建自己的类库呢,今天就来学习做一个吧。     首先就是打开xcode创建一个framework了       目录结构就是如上图所示了     然后去build settings 把类型改成静态的类库        紧接着 开始写 MyUtils.h 和 MyUtils.m文件   MyUtils.h   #import <Foundation/Foundation.h> @inter ...
objective-c 变量前加下划线"_"是什么意思?作者:王涛链接:http://www.zhihu.com/question/26605346/answer/33392620来源:知乎这是苹果的编程规范(也说不上规范,就是算是习惯吧),声明的property如果没有特意指定synthesize的话,那么Objective-C就会自动的给你声明一个_开头的实例变量。例如声明了一个叫param的property@property (nonatomic, copy)NSString *param;通过_param进行存取的话是不会调用该变量的setter或者getter方法 ...

超全!iOS 面试题汇总

    博客分类:
  • ios
 
http://www.cocoachina.com/programmer/20151019/13746.html
今天用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. ...
MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init]; if (!mailViewController) { // 在设备还没有添加邮件账户的时候mailViewController为空,下面的present view controller会导致程序崩溃,这里要作出判断 NSLog(@"设备还没有添加邮件账户"); }  
NSKeyedUnarchiver 和 NSKeyedarchiver (加密形式)归档 的储存方式   用 archiveRootObject 进行简单的归档   //=================NSKeyedArchiver======================== NSString *saveStr1 = @"我是"; NSString *saveStr2 = @"数据"; NSArray *array = [NSArray arrayWithObjects:saveStr1, saveStr2 ...
擦 还有那么坑的属性 我布局在scrollview中的tableView会乱跑,原来是这个问题,一般来说就是,如果你要隐藏什么statusbar navigationbar之类的就把这属性设为NO;   @当我们在一个UIViewController中同时创建2个tableView的时候,如果把它们的frame中的Y坐标设置为一样,你可能会发现它们的位置并没有达到你想要的结果.比如第一tableView个frame(0,0,320,568),另一个也frame(0,0,320,568),结果会发现第二个tableView的第一行数据被导航栏遮挡了,以至于我们不得已把第二个frame改成(0 ...
http://www.jianshu.com/p/73be6d0e152f   http://blog.csdn.net/yiyaaixuexi/article/details/8035014
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager.requestSerializer setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; afnetworking  提交表单数据时要使用 application/x-www-form-urlencoded
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 fontWith ...
不小心在开发过程中,得到了(null)以及<null>的返回值,找了好长时间只找到了一个关于<null>的。 由于要根据返回值进行判断,做出必要反应,因此必须知道返回值所代表的具体字符,在得到(null)后利用isEqual:和@“”,NULL,@“(null)”,nil,Nil比较后均得不到正确结果,弄得不知所措了,但是还是感觉像nil,不得已,创建一个字符串,赋值为nil,打印输出,果然是(null),想不通的是为什么不等。最后试了一下“==”,成功了。费尽周折之后才明白原来要这样用: if(m_result==nil) {      NSLog(@&quo ...
Global site tag (gtag.js) - Google Analytics