摘要:
uialertview在iOS9.0被弃用后,来看看UIAlertController的用法 使用起来稍微有些复杂 这是最普通的一个alertcontroller,一个取消按钮,一个确定按钮。 新的alertcontroller,其初始化方法也不一样了,按钮响应方法绑定使用了block方式,有利有弊 阅读全文
摘要:
说白了,就是在navigationcotroller中,显示一个view,具体实现可参考如下代码 阅读全文
摘要:
float viewWidth = weatherView.frame.size.width;//view的宽 float viewHeight = weatherView.frame.size.height;//view的高 float labelWidth = label.frame.size.width; float labelHeight = label.frame.size.heigh... 阅读全文
摘要:
- (NSMutableDictionary *)getParams:(NSString *)str { NSMutableDictionary *dict = [NSMutableDictionary dictionary]; NSArray *item = [str componentsSeparatedByString:@"&"]; for (NSString *p... 阅读全文
摘要:
1. rangeOfString:截取指定字符串的长度; 2. substringToIndex:7:截取从0 索引到指定索引(7)长度的字符串3. substringFromIndex:9:截取从指定索引(9)到末尾长度的字符串4. NSRange range = NSMakeRange(0,7) 阅读全文
摘要:
// 开启倒计时效果 // button type要改成custom 不然会闪 -(void)openCountdown{ __block NSInteger time = 59; //倒计时时间 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); ... 阅读全文