摘要: 工程类名前缀 阅读全文
posted @ 2016-03-12 10:14 逆时光 阅读(186) 评论(0) 推荐(0) 编辑
摘要: UIFount有个属性可以测量高度的文本行 NSInteger numberLines = textView.contentSize.height / textView.font.lineHeight; 阅读全文
posted @ 2016-02-28 12:55 逆时光 阅读(347) 评论(0) 推荐(1) 编辑
摘要: 8. NSString *priceTotal = [NSString stringWithFormat:@"合计:¥%@",@(money)]; 阅读全文
posted @ 2016-02-20 21:57 逆时光 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 虽然这个需求比较奇葩,但有的时候你仍然会用到!!在iOS 5 中,苹果引入了一个解析JSON串的NSJSONSerialization类。通过该类,我们可以完成JSON数据与NSDictionary和NSArray之间的转化。以前,我记得我用的是第三方的插件。但是,苹果出了这套解析后,效率也大大了超... 阅读全文
posted @ 2015-11-19 18:34 逆时光 阅读(1462) 评论(0) 推荐(0) 编辑
摘要: 1.如果你想自定义一个UIbutton,又不想手写,可怎么用Xib画呢! 我想你应该会自定义UIView吧!!先自定义一个UIView,然后让它继承于UIbutton,就可以了!! 因为它们都是继承关系! 唉!只能凑字了 阅读全文
posted @ 2015-11-19 18:24 逆时光 阅读(576) 评论(0) 推荐(0) 编辑
摘要: 1.有的时候经常会有这样的数字 0.067 0.046757458 2.用了Float以后 就会在后面有很多的0 0.1000003.后来发现字符串可以解决这个问题 它会去掉多余的0 具体使用是这样的 NSString *priceTotal = [NSString stringWith... 阅读全文
posted @ 2015-11-19 18:17 逆时光 阅读(145) 评论(0) 推荐(0) 编辑
摘要: scrollView的宽度设置为你想要平移的宽度。比如一次平移 200, 可以将scrollView的frame 设置为 self.scrollView.frame=CGRectMake(0,0,200, [[UIScreenmainScreen]bounds].size.width); co... 阅读全文
posted @ 2015-11-06 16:29 逆时光 阅读(1958) 评论(0) 推荐(0) 编辑
摘要: TableView行缩进-(NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath{ return indexPath.row + 10;}如果是自... 阅读全文
posted @ 2015-11-06 16:05 逆时光 阅读(610) 评论(0) 推荐(0) 编辑
摘要: - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation... 阅读全文
posted @ 2015-11-06 16:00 逆时光 阅读(1272) 评论(0) 推荐(0) 编辑
摘要: 1.在AppDelegate中设置微信代理@interface AppDelegate ()2.在openUrl中判断返回url 并设置代理- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sour... 阅读全文
posted @ 2015-11-06 15:37 逆时光 阅读(458) 评论(0) 推荐(0) 编辑