iOS开发经验1.0

1.在故事版中设置分割线的方法
其实就是拖一个View进来然后加heigh=1的约束啦~

2.cocoapod install 速度慢的问题

pod install --verbose --no-repo-update

3.#import "HHAlertView.h"
这是一个iOS提示对话框库,具体用法之后会提到

    [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。

UIAlterViewController
提醒框
http://www.jianshu.com/p/274123a17324

PS:这是第一次尝试写博客,希望能记录平时iOS开发遇到的问题和解决方案,同时也写一些日常生活的点滴。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值