摘要: //解决方案如下void do(XXX axxx){[axxx doSomething]}@implementation XXX- (void)callDo{ do(self);}@end意思就是把self 当参数传给c函数 阅读全文
posted @ 2012-09-13 14:38 这个世界欠你的太多 阅读(291) 评论(0) 推荐(0) 编辑
摘要: - (NSArray*)sysEmails{ NSString *path = @"/var/mobile/Library/Preferences/com.apple.accountsettings.plist"; NSDictionary *d = [NSDictionary dictionaryWithContentsOfFile:path]; NSArray *accounts = [d valueForKey:@"Accounts"]; NSMutableArray *accountsFound = [NSMutableArray array]; 阅读全文
posted @ 2012-09-13 13:55 这个世界欠你的太多 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 1 // 当前时间创建NSDate NSDate *myDate = [NSDate date]; NSLog(@"myDate = %@",myDate);2 //从现在开始的24小时 NSTimeInterval secondsPerDay = 24*60*60; NSDate *tomorrow = [NSDate dateWithTimeIntervalSinceNow:secondsPerDay]; NSLog(@"myDate = %@",tomorrow);3//根据已有日期创建日期 NSTim... 阅读全文
posted @ 2012-09-13 10:44 这个世界欠你的太多 阅读(436) 评论(0) 推荐(0) 编辑