摘要:
1.abs(a) 处理int类型a的取绝对值 2.fabsf(a) 处理float类型a的取绝对值 3.fabs(a) 处理double类型a的取绝对值 1.abs(a) 处理int类型a的取绝对值 2.fabsf(a) 处理float类型a的取绝对值 3.fabs(a) 处理double类型a的取
阅读全文
posted @ 2017-06-27 13:52
ZOYOO
阅读(892)
推荐(0)
摘要:
一: 去重 有时需要将NSArray中去除重复的元素,而存在NSArray中的元素不一定都是NSString类型。今天想了想,加上朋友的帮助,想到两种解决办法,先分述如下。 1.利用NSDictionary的AllKeys(AllValues)方法 可以将NSArray中的元素存入一个字典,然后利用
阅读全文
posted @ 2017-06-23 17:09
ZOYOO
阅读(2693)
推荐(0)
摘要:
#pragma 正则匹配手机号 + (BOOL)checkTelNumber:(NSString *) telNumber { NSString *pattern = @^1+[3578]+\d{9}; NSPredicate *pred = [NSPredicate predicateWithFo
阅读全文
posted @ 2017-06-23 09:59
ZOYOO
阅读(893)
推荐(0)
摘要:
// 取得用户默认信息 NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults]; // 取得 iPhone 支持的所有语言设置 NSArray *languages = [defaults objectForKey : @"
阅读全文
posted @ 2017-06-12 10:45
ZOYOO
阅读(2332)
推荐(0)
摘要:
UIButton内有两个控件titleLabel和imageView,可以用来显示一个文本和图片,这里的图片区别于背景图片。给UIButton设置了title和image后,它们会图片在左边,文本在图片右边显示。它们两个做为一个整体依赖于button的contentHorizontalAlignme
阅读全文
posted @ 2017-06-07 11:51
ZOYOO
阅读(706)
推荐(0)
摘要:
一不小心,手机又升级了,哎😔 (1) 下载 ios 11 开发包(11.5M) https://pan.baidu.com/s/1bFpDnS (2) Xcode添加路径 将下载好的iOS 11文件解压复制:/applications/Xcode.app/Contents/Developer/Pl
阅读全文
posted @ 2017-06-06 09:58
ZOYOO
阅读(4551)
推荐(0)
摘要:
NSCalendar *calender2 = [[NSCalendar alloc]initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; [calender2 setFirstWeekday:2];// 国外是从周日 开始算的 我们是
阅读全文
posted @ 2017-06-01 17:42
ZOYOO
阅读(2415)
推荐(0)
摘要:
[UIApplication sharedApplication].applicationState will return current state, check it possible values and don’t create unnecessary flags when you can
阅读全文
posted @ 2017-05-31 15:25
ZOYOO
阅读(1903)
推荐(0)
摘要:
错误: The number of sections contained in the table view after the update (1) must be equal to the number of sections contained in the table view before
阅读全文
posted @ 2017-05-24 18:07
ZOYOO
阅读(4084)
推荐(0)
摘要:
NSArray *segmentedArray = [NSArrayarrayWithObjects:STR(@"Mynews"),STR(@"Systemmessage"),nil]; UISegmentedControl *segmentedControl = [[UISegmentedCont
阅读全文
posted @ 2017-05-23 15:03
ZOYOO
阅读(13819)
推荐(0)