//UUID NSLog(@" qqqqqqqqqqqqqqqqqqqqqqq:::::::::::%@", [[NSUUID UUID] UUIDString]); //Vindor标示符 (IDFV-identifierForVendor) NSLog(@" qqqqqqqqqqqqqqqqqq ...
分类:
移动开发 时间:
2016-08-01 17:26:54
阅读次数:
188
float numberToRound; int result; numberToRound = 4.51; result = (int)roundf(numberToRound); NSLog(@"roundf(%f) = %d", numberToRound, result); // round ...
分类:
移动开发 时间:
2016-08-01 11:55:27
阅读次数:
736
1.取字符串中的某段字符串[plain]viewplaincopyprint?NSString*str=@"12sadfsdf56afsdf";NSLog(@"%@",str);NSString*thrStr=[strstringByReplacingOccurrencesOfString:@"56"withString:@"88"];NSLog(@"%@",thrStr);即把12sadfsdf56afsdf中的56替换为88,替换后字符串为:12sad..
分类:
移动开发 时间:
2016-07-19 19:06:19
阅读次数:
212
在AppDelegate,定义方法 void catchExceptionHandler(NSException *exception) { NSLog(@"CRASH: %@", exception); NSLog(@"Stack Trace: %@", [exception callStackS ...
分类:
移动开发 时间:
2016-07-14 15:10:44
阅读次数:
150
iOS & Swift新旧版本更替, 在Apple WWDC大会开始之际, 也迎来了iOS 10.0, Swift 3.0 测试版, 到目前为止, 已经是测试版2.0, 每次更新都带来了新的语法变化, Swift更加简洁, 但是Xcode 越发不给力, 输出变本加厉, NSLog 一如既往的不好使, ...
分类:
移动开发 时间:
2016-07-11 23:49:29
阅读次数:
332
OC语言description方法和sel 一、description方法 Description方法包括类方法和对象方法。(NSObject类所包含) (一)基本知识 -description(对象方法) 使用NSLog和@%输出某个对象时,会调用对象的description方法,并拿到返回值进行 ...
分类:
移动开发 时间:
2016-07-09 10:38:59
阅读次数:
190
总结: 三类工具 基础工具 (NSLog的方式记录运行时间.) 性能工具.检测各个部分的性能表现,找出性能瓶颈 内存工具.检查内存正确性和内存使用效率 性能工具: 可以衡量CPU的使用,时间的消耗,电池的消耗 一、Time Profile 启动Time Profile:Xcode ——> Produ ...
分类:
移动开发 时间:
2016-07-08 13:50:00
阅读次数:
347
// 获取当前的日期 NSDate *date1 = [NSDate date]; NSLog(@"data1 = %@", date1); // 获取三天前的日期 NSDate *date2 = [[NSDate alloc]initWithTimeIntervalSinceNow:-3*3600 ...
分类:
其他好文 时间:
2016-07-07 12:57:08
阅读次数:
201
在Swift中如果想要以如下方式执行NSLog,则编译器必定抱怨:class Foo {}
NSLog("%@",Foo())因为Foo是原生Swift类不是继承自NSObject,而NSLog需要其Description方法,所以我们必须使Foo派生自NSObject,然后重载Description方法:class Foo:NSObject {
override var descripti...
分类:
编程语言 时间:
2016-07-01 11:58:19
阅读次数:
299
// 删除对应数据 // for (OrderModel *order in self.OrderList) { // // NSLog(@"%ld %ld",order.tagBut,(long)btn.tag); // // if (order.tagBut==btn.tag) { // /// ...
分类:
移动开发 时间:
2016-06-30 18:13:05
阅读次数:
166