iOS开发经验1.0
2016-05-21 14:23
465 查看
1.在故事版中设置分割线的方法
其实就是拖一个View进来然后加heigh=1的约束啦~
2.cocoapod install 速度慢的问题
3.
这是一个iOS提示对话框库,具体用法之后会提到
4.
这是一个按照时间执行方法的方法函数,在等待60秒内验证码发送的startCount使用到了。
使用 NSTimer scheduledTimerWithTimeInterval: target: selector:userInfo: repeats: 的时候有两个地方需要注意 。
首先selector指定的方法必须是带一个参数的方法,并且那个参数的类型是NSTimer *。举个栗子
sendBroadcast的定义形式应该是如下
其次,参数是靠NSTimer 对象的userInfo属性来传递的。
以上是网上找的解释,之后发现具体实现根本不是一回事,并且最终效果不尽如人意(每次都有闪动),所以采用了第三方MZTimerlabel。
5.
UIAlterViewController
提醒框
http://www.jianshu.com/p/274123a17324
PS:这是第一次尝试写博客,希望能记录平时iOS开发遇到的问题和解决方案,同时也写一些日常生活的点滴。
其实就是拖一个View进来然后加heigh=1的约束啦~
2.cocoapod install 速度慢的问题
pod install --verbose --no-repo-update
3.
#import "HHAlertView.h"
这是一个iOS提示对话框库,具体用法之后会提到
4.
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(XXXX:) userInfo:nil repeats:YES];
这是一个按照时间执行方法的方法函数,在等待60秒内验证码发送的startCount使用到了。
使用 NSTimer scheduledTimerWithTimeInterval: target: selector:userInfo: repeats: 的时候有两个地方需要注意 。
首先selector指定的方法必须是带一个参数的方法,并且那个参数的类型是NSTimer *。举个栗子
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(sendBroadcast:) userInfo:@"hello I'm the info to send" repeats:NO];
sendBroadcast的定义形式应该是如下
其次,参数是靠NSTimer 对象的userInfo属性来传递的。
-(void)sendBroadcast: (NSTimer *)timer { NSString *msg = (NSString *)[timer userInfo]; // [msg isEqualToString @"hello I'm the info to send"] == YES }
以上是网上找的解释,之后发现具体实现根本不是一回事,并且最终效果不尽如人意(每次都有闪动),所以采用了第三方MZTimerlabel。
5.
UIAlterViewController
提醒框
http://www.jianshu.com/p/274123a17324
PS:这是第一次尝试写博客,希望能记录平时iOS开发遇到的问题和解决方案,同时也写一些日常生活的点滴。
相关文章推荐
- iOS-block三种应用场景
- ios的hitTest方法以及不规则区域内触摸事件处理方法
- IOS 开发 事件截断处理
- IOS 开发 手势 及事件传递机理
- IOS 开发 手势使用
- IOS中 Block用法进阶二 局部变量和全局变量在Block中的使用
- IOS中 Block用法进阶一
- iOS static变量
- iOS开发:发布证书无法安装,不能修改"System Roots"钥匙串
- 四步搞定NiosII工程路径改变
- IOS之定位详解
- 谈谈iOS Animation
- iOS 获取当前展示的页面
- iOS 7 修改默认布局从status bar 底部开始
- iOS 崩溃分析
- samsung bios configuration怎么设置U盘启动
- Make My Ostream!
- iOS内存话题: 弱引用下的懒加载
- Missing iOS Distribution signing identity问题解决
- iOS 开启后台运行