随笔分类 -  其他

摘要:In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value 02:00:00:00:00:00. If you need to identify the device, use the identifierForVendor property of UIDevice instead. (Apps that need an identifier for their own advertising purposes should consider using th 阅读全文
posted @ 2013-11-15 18:42 人魔七七 阅读(452) 评论(0) 推荐(0) 编辑
摘要:if (content) { CGSize constraint = CGSizeMake(self.contentWide, CGFLOAT_MAX); CGSize size = [content sizeWithFont:contentFont constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; frame = CGRectMake(self.contentX, y, self.contentWide, size.height+16); UITextView *textView = [[UITextV. 阅读全文
posted @ 2012-12-21 14:07 人魔七七 阅读(7958) 评论(0) 推荐(0) 编辑
摘要:http://bugfix.lofter.com/post/b071_13117b 阅读全文
posted @ 2012-12-21 12:42 人魔七七 阅读(231) 评论(0) 推荐(0) 编辑
摘要:由于padding 的原因出现这个问题。因此即使减16 再返回的高度上加16还是不怎么准确。因此根据UITextView 的contentSize 的height 计算比较准确 阅读全文
posted @ 2012-12-21 12:35 人魔七七 阅读(392) 评论(0) 推荐(0) 编辑
摘要:http://stackoverflow.com/questions/5932397/the-class-is-not-key-value-coding-compliant-for-the-key 阅读全文
posted @ 2012-12-17 10:28 人魔七七 阅读(1584) 评论(0) 推荐(0) 编辑
摘要:NSString * regexPassword = @"^.{6,}$"; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regexPassword]; if (![predicate evaluateWithObject:self.password.text]||![predicate evaluateWithObject:self.againPassWord.text]||![predicate evaluateWithObject:sel 阅读全文
posted @ 2012-11-27 17:00 人魔七七 阅读(214) 评论(0) 推荐(0) 编辑
摘要:// NSString *iTunesLink = [NSString stringWithFormat:@"https://itunes.apple.com/cn/app/%@/id%d?mt=8",APPNAME,APPID];// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]]; NSString *iTunesLink = [NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id&q 阅读全文
posted @ 2012-11-22 16:10 人魔七七 阅读(1311) 评论(0) 推荐(0) 编辑
摘要:在程序中加载ttf文件首先要解决的问题,是在程序中加载.ttf/otf文件。我们在示例程序的资源束中加入了一个“方正大黑简体.ttf”的文件。这个文件是我从Mac系统中搜索到的,应该是MicrosoftOffice中提供的字体文件。我们用以下代码来加载它:NSString *fontPath = [[NSBundlemainBundle] pathForResource:@"方正大黑简体" ofType:@"ttf"];CGDataProviderReffontDataProvider = CGDataProviderCreateWithFilename 阅读全文
posted @ 2012-09-27 17:41 人魔七七 阅读(6331) 评论(0) 推荐(0) 编辑