自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(118)
  • 收藏
  • 关注

原创 With OS X EI Capitan, there is a new security function that prevents you from mo

resolvedreason:With OS X EI Capitan, there is a new security function that prevents you from modifying system files called Rootless1.sudo gem install -n /usr/local/bin fastlane or2.disable rootle...

2016-04-14 13:50:22 124

原创 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 errorERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr...

2016-04-14 13:42:03 128

原创 Purelayout小结1

Purelayout小结1我们通常用xib文件来布局,但碰到动态的视图总是使用代码方式的AutoLayout。 很多公司还使用了 比较重的框架 比如Masonry. 现在在做的项目中用的是一种比较轻量级别的布局类库,举一个布局的例子上边的是view1 下边的是view2实现的代码是这样:- (void)viewDidLoad { [super viewDidLoad]; //创

2016-04-10 10:54:49 624

原创 Routable-iOS

我们在iOS中通常都是用 pushViewController 或者 presentViewController 的方式来做视图间的跳转,但是这种方式免不了要在一个controller中初始化另外一个controller,使用Routable可以实现controller之间的解耦。这是routable-ios的github地址:https://github.com/clay

2016-04-01 10:21:53 1685

原创 解决status bar的颜色问题

   http://www.tuicool.com/articles/vIbMry

2016-01-26 18:38:38 188

原创 blog 收藏

contentSize是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。contentOffset是scrollview当前显示区域顶点相对于frame顶点的偏移量,比如上个例子你拉到最下面,contentoffset就是(0 ,4...

2015-11-14 22:55:02 69

原创 创建自己的framework

我们在做app或者做项目的时候经常用其它的类库 比如 uikit啦   corelocation 之类,只能看到里面的.h文件,.m文件是看不到的。怎么创建自己的类库呢,今天就来学习做一个吧。  首先就是打开xcode创建一个framework了   目录结构就是如上图所示了   然后去buil

2015-11-12 18:09:26 331

创建自己的framework

我们在做app或者做项目的时候经常用其它的类库 比如 uikit啦   corelocation 之类,只能看到里面的.h文件,.m文件是看不到的。怎么创建自己的类库呢,今天就来学习做一个吧。  首先就是打开xcode创建一个framework了   目录结构就是如上图所示了   然后去build settings 把类型改成静态的类库    ...

2015-11-12 17:38:16 108

原创 objective-c 变量前加下划线"_"是什么意思?

objective-c 变量前加下划线"_"是什么意思?作者:王涛链接:http://www.zhihu.com/question/26605346/answer/33392620来源:知乎这是苹果的编程规范(也说不上规范,就是算是习惯吧),声明的property如果没有特意指定synthesize的话,那么Objective-C就会自动的给你声明一个_开头的实例变量。例如声明了一个叫param...

2015-11-12 12:05:36 1196

原创 超全!iOS 面试题汇总

http://www.cocoachina.com/programmer/20151019/13746.html

2015-11-02 23:15:53 82

原创 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...

2015-11-02 22:19:56 73

原创 使用MFMailComposeViewController发送邮件时防止崩溃

MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init]; if (!mailViewController) { // 在设备还没有添加邮件账户的时候mailViewController为空,下面的present view controll...

2015-11-02 11:37:39 112

原创 NSKeyedUnarchiver 和 NSKeyedarchiver

NSKeyedUnarchiver 和 NSKeyedarchiver (加密形式)归档 的储存方式 用 archiveRootObject 进行简单的归档  //=================NSKeyedArchiver======================== NSString *saveStr1 = @"我是"; NSString *sav...

2015-10-13 12:21:36 122

原创 automaticallyAdjustsScrollViewInsets(个人认为iOS7中略坑爹的属性)

擦 还有那么坑的属性 我布局在scrollview中的tableView会乱跑,原来是这个问题,一般来说就是,如果你要隐藏什么statusbar navigationbar之类的就把这属性设为NO; @当我们在一个UIViewController中同时创建2个tableView的时候,如果把它们的frame中的Y坐标设置为一样,你可能会发现它们的位置并没有达到你想要的结果.比如第一tab...

2015-09-29 18:05:32 102

原创 iOS 关于屏幕旋转shouldAutorotate

http://www.jianshu.com/p/73be6d0e152f http://blog.csdn.net/yiyaaixuexi/article/details/8035014

2015-09-07 12:49:38 110

原创 afnetworking 提交表单数据

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager.requestSerializer setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-...

2015-08-17 18:14:22 273

原创 自定义 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";...

2015-08-06 16:59:04 66

原创 转 IOS开发中(null)与<null>的处理

不小心在开发过程中,得到了(null)以及&lt;null&gt;的返回值,找了好长时间只找到了一个关于&lt;null&gt;的。由于要根据返回值进行判断,做出必要反应,因此必须知道返回值所代表的具体字符,在得到(null)后利用isEqual:和@“”,NULL,@“(null)”,nil,Nil比较后均得不到正确结果,弄得不知所措了,但是还是感觉像nil,不得已,创建一个字符串,赋值为...

2015-06-05 16:04:15 88

原创 动态计算UITableViewCell高度详解

http://codingobjc.com/blog/2014/10/15/shi-yong-autolayoutshi-xian-uitableviewde-celldong-tai-bu-ju-he-ke-bian-xing-gao/index.html http://www.ifun.cc/blog/2014/02/21/dong-tai-ji-suan-uitableviewce...

2015-06-05 09:25:30 72

转载 动态计算UITableViewCell高度详解

工作中用到了 动态计算UITableViewCell高度找到了两篇不错的文章http://codingobjc.com/blog/2014/10/15/shi-yong-autolayoutshi-xian-uitableviewde-celldong-tai-bu-ju-he-ke-bian-xing-gao/index.htmlhttp://www.if

2015-06-05 09:19:07 335

原创 将博客搬至CSDN

将博客搬至CSDN http://blog.csdn.net/dsr_22

2015-06-03 09:35:19 41

原创 frame 和 bounds 的区别

  bounds  是以自己为参考坐标的 frame 是以父对象为参考坐标的

2015-06-02 12:56:56 54

原创 ios 解析json文件 使用touchjson来解析

 git hub 地址   https://github.com/TouchCode/TouchJSON  //// ViewController.m// JsonProject//// Created by seandeng on 6/1/15.// Copyright (c) 2015 seandeng. All rights reserved....

2015-06-01 17:37:19 221

原创 bmob

bmob  http://www.bmob.cn/ 有时候我们想为自己的app加一个服务器端的服务 比如排行榜什么的 自己租server搭数据库 搞webservice太麻烦了 现在有人做了了这个  请求量不大的话是免费的 ...

2015-06-01 17:04:40 187

原创 table cell选中又反选

[tableView deselectRowAtIndexPath:indexPath animated:YES];  

2015-05-29 18:18:59 219

原创 uitableview的分割线从最左边开始显示

有时候我们需要将uitableview的分割线从最左边开始显示,而不是系统默认的方法 比如这样子  我们可以这样写代码 首先在viewDidLoad方法中加上如下代码:if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {[self.tableView setSepa...

2015-05-29 17:59:05 74

原创 一些问题的积累

1.Category支持添加属性与成员变量吗 不支持2.iOS7之后, 蓝牙的围栏功能所谓iBeacons,就是一种使用蓝牙低能耗进行微定位的技术,它允许iOS设备使用蓝牙4.0获取位置数据。也就是说,配备iBeacons技术的iOS设备就相当于位置数据的接收方和发送方,在蓝牙时代里进行着数据的互联。iBeacon的出现让地理定位能够更加精确——从几百米的精度提高到了一米甚至半米。这个精细度非...

2015-05-29 03:50:04 232

原创 修改 navigationbar的字体颜色

修改 navigationbar的字体颜色 比如返回按钮 [self.navigationController.navigationBar setTintColor:[UIColor whiteColor]];     修改 navigationbar的颜色[self.navigationController.navigationBar.barTintColor =  ...

2015-05-18 15:37:28 83

原创 设置status bar的字体颜色 为白色

Set UIViewControllerBasedStatusBarAppearance to NO.Call [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

2015-05-18 15:35:45 356

原创 贺臣的博客

贺成的博客 写的文章很好 这篇是讲@property的 也讲一些内存管理http://www.cnblogs.com/andyque/archive/2011/08/03/2125728.html

2015-05-18 11:52:01 105

原创 objective-c中registerClass的用法?作用是什么?

registerClass我记得是iOS6新加的在此之前cell的重用写法是 static NSString *ID = @"cell";UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];if (cell == nil) { cell = [[UITableViewCell ...

2015-05-18 10:09:39 389

原创 ios 计算目录大小 常用于计算缓存

[code="java"]//通常用于删除缓存的时,计算缓存大小//单个文件的大小- (long long) fileSizeAtPath:(NSString*) filePath{ NSFileManager* manager = [NSFileManager defaultManager]; if ([manager fileExistsAtPath:fileP...

2015-05-06 14:20:00 48

原创 mac photoshop

mac photoshophttp://www.sdifenzhou.com/657.html

2015-04-29 09:30:46 104

原创 app 检查更新

一篇讲述app检查更新的文章  挺不错的 应用到了工作中  http://www.tuicool.com/articles/aENF32

2015-04-29 08:48:17 111

原创 本地相册和摄像机调用

http://www.xuanyusong.com/archives/1493     一篇很好的文章讲本地相册和相机调用

2015-04-28 09:20:47 71

原创 Slow start for AVAudioPlayer the first time a sound is played

我们编写app程序的时候经常需要播放一些声音效果 但是这些声音在播放第一次的时候会造成程序卡顿, 因为在初始化, 从而引起不好的用户体验 可以用 [theAudio prepareToPlay];   来初始化音乐的播放,这样就能避免第一次播放时程序的卡顿了 NSString *path = [[NSBundle mainBundle] pathForResource:@...

2015-04-07 01:13:46 244

原创 iphone, dismiss keyboard when touching outside of textfield

You'll need to add an UITapGestureRecogniser and assign it to the view, and then call resign first responder on the textfield on it's selector.The code:In viewDidLoadUITapGestureRecognizer*tap...

2015-02-23 22:40:58 119

原创 cocospods 一直停留在 Analyzing dependencies

使用cocospods的时候 挂上了vpn   打了 pod install  一直停留在 Analyzing dependencies 可以试试 pod install --no-repo-update 一下子就全部下好了 还不知道什么原理...

2015-01-28 23:51:56 335

原创 关于不同地区时间的显示格式

使用ios时间的时候 不同地区会显示不同格式的时间 比如在中国会显示 9月 2014 而在美国就显示 Sep 2014这点怎么做到呢 ios提供了一个api - (NSString*)getPreferredLanguage{ NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSArray...

2014-09-15 23:16:07 443

原创 preferredStatusBarStyle

当一个view的背景被你设置成黑色的时候,上面的事件会看不见,ios7中有一个简单的方法解决这个问题,就是给view加一个方法 - (UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent;} 这样就行了,上面的时间 电池容量等信息就会是白色的...

2014-09-09 22:54:43 91

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除