iOS 常用功能
李晨光1992
这个作者很懒,什么都没留下…
展开
-
iOS CoreData 存取数组字典等数据类型
当我们想要在数据库中存入一个数组或者字典的时候,往往有好几种方法,我觉得这种方法比较简单:1.首先建立数据库表,在选择Attribute的Type 的时候选择Transformable2.将请求的NSData数据直接放入数据库中,不需要取解Json3.在取数据的时候,解析数据即可[NSJSONSerializationJSONObjectWithData:user.da原创 2015-12-09 12:45:32 · 2633 阅读 · 0 评论 -
iOS CocoaPods 快速导入
想要导入和更新更快,那就使用下面两句吧pod install --verbose --no-repo-updatepod update --verbose --no-repo-update原创 2015-12-09 17:08:07 · 283 阅读 · 0 评论 -
iOS 简单实现alertview 定时移除
- (void)viewDidLoad { [superviewDidLoad]; [self showAlert:@"呵呵"]; // Do any additional setup after loading the view, typically from a nib.}//时间- (void)showAlert:(NSS原创 2015-12-13 16:01:31 · 476 阅读 · 0 评论 -
iOS 设置视图半透明而子控件不透明
UIColor *color = [UIColor blackColor];bgView.backgroundColor = [color colorWithAlphaComponent:0.5];原创 2015-12-14 00:09:03 · 639 阅读 · 0 评论 -
iOS 简单的实现手机号正误的判断(Warning: Attempt to present... whose view is not in the window hierarchy!
- (void)viewDidLoad { [superviewDidLoad]; /*这里粗略的写了一个按钮, 否则在viewDidLoad中直接运行checkTel方法会报错: Warning: Attempt to present on whose view is not in the window hierarchy!原创 2015-12-08 14:08:05 · 388 阅读 · 0 评论 -
iOS 简单实现重新获取验证码并倒计时60秒
@implementation ViewController{ UIButton * _receiveCheckNumButton;}- (void)viewDidLoad { [superviewDidLoad]; _receiveCheckNumButton = [[UIButtonalloc] initWithFram原创 2015-12-08 14:55:21 · 3716 阅读 · 0 评论 -
JSONModel的使用
JSONModel, Mantle这两个开源库都是用来进行封装JSON->Model的, 想想看, 直接向服务器发起一个请求,然后回来后,就是一个Model, 直接使用, 这是一个多么美好的事情。 感谢GitHub的开源精神。那我们开始吧。 先说说这两个的差别。这两个使用的方法其实都差不多, 详细的使用方法请直接GitHub上找, 还是比较简单地。 就我个人来说JSONMo原创 2016-03-03 11:16:08 · 307 阅读 · 0 评论 -
UITableView 总结
UITableView 总结UITableView是UIScrollView的子类,因此它可以自动响应滚动事件(一般为上下滚动)。它内部包含0到多个UITableViewCell对象,每个table cell展示各自的内容。当新cell需要被显示时,就会调用tableView:cellForRowAtIndexPath:方法来获取或创建一个cell;而不可视时,它又会被转载 2016-03-04 17:20:47 · 315 阅读 · 0 评论