摘要: CGSize strSize = [str boundingRectWithSize:CGSizeMake(W, H) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont sys 阅读全文
posted @ 2017-03-13 14:41 飘金 阅读(4775) 评论(0) 推荐(0) 编辑
摘要: //接收web事件 -(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationTyp 阅读全文
posted @ 2016-12-21 13:53 飘金 阅读(1229) 评论(0) 推荐(0) 编辑
摘要: -(void) tableView:(UITableView *)tableView willDisplayCell:(nonnull UITableViewCell *)cell forRowAtIndexPath:(nonnull NSIndexPath *)indexPath{ if([ind 阅读全文
posted @ 2016-11-09 13:38 飘金 阅读(597) 评论(0) 推荐(0) 编辑
摘要: - (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section 组头将要出现的时候系统会调用; - (void)tableView:(UITab 阅读全文
posted @ 2016-10-10 11:20 飘金 阅读(3679) 评论(0) 推荐(0) 编辑
摘要: 通常,我们希望在滑动结束后,执行一些代码。scrollViewDidEndDecelerating方法在一定程度上可以解决我们的需求。注意是一定程度上。 顾名思义,scrollViewDidEndDecelerating表示减速结束了。然而减速结束和滑动结束并不等价。因为有些滑动并不需要减速也可以结 阅读全文
posted @ 2016-10-09 18:08 飘金 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 1.加文字 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 - (UIImage *)imageWithLogoTe 阅读全文
posted @ 2016-09-08 15:54 飘金 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1.自定义cell中子控件应该添加在cell的contentView中,不然因为cell的复用可能导致奇怪的bug(label内容错误,大小错误等)。 阅读全文
posted @ 2016-08-12 19:21 飘金 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 最后一行显示不全是因为表格的高度大于了控制view的高度,减小表格的高度小于的等于控制的view的高度即可 阅读全文
posted @ 2016-08-08 13:38 飘金 阅读(569) 评论(0) 推荐(0) 编辑
摘要: 设置好scrollView.width即是控制滑动的距离, scrollView.clipsToBounds = NO;控制是否显示多出的部分(可灵活运用) 阅读全文
posted @ 2016-08-03 13:58 飘金 阅读(1933) 评论(0) 推荐(0) 编辑
摘要: 动画效果提供了状态或页面转换时流畅的用户体验,在iOS系统中,咱们不需要自己编写绘制动画的代码,Core Animation提供了丰富的api来实现你需要的动画效果。 UIKit只用UIView来展示动画,动画支持UIView下面的这些属性改变: frame bounds center transf 阅读全文
posted @ 2016-06-17 09:16 飘金 阅读(285) 评论(0) 推荐(0) 编辑