Masonry 中布局的一个小坑
摘要:标题 和消息一样的布局 怎么会少一块 好烦恼 第一次用masonry 原先都没有第三方布局 在消息页面也没有问题 找了半天原因 结果加一行就搞定了 留下深刻教训
阅读全文
随意写点常用的小代码 随时添加
摘要://点击空白处事件 UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(keyboardHide:)]; //设置成NO
阅读全文
一个小封装 能在view pushVC
摘要:#import <UIKit/UIKit.h> @interface UIView (ViewController) - (UIViewController *)viewController; @end .m中 #import "UIView+ViewController.h" @implement
阅读全文
tableView 中cell 的一些小代码
摘要:遇见就记 每天进步一些 cell分割线 顶头 去尾 TableView.layoutMargins = UIEdgeInsetsZero TableView.separatorInset = UIEdgeInsetsZero; TableView.tableFooterView = [[UIView
阅读全文
实现一个btn接受 数组 换行 一个小知识
摘要:NSArray *arry = @[@"销售",@"淘宝运营",@"夜班",@"京东",@"电话销售",@"网店运营",@"兼职",@"司机",@"美工",@"会计"]; CGFloat preRight = 20; CGFloat preTop = 40; for (NSInteger i = 0
阅读全文
label 根据文字label自适应宽度
摘要:UILabel *Label = [[UILabel alloc]init]; Label.text = @"长一点也是可以的"; Label.textColor = black_Color; Label.textAlignment = NSTextAlignmentLeft; gsmcLabel.
阅读全文
button 图片文字 方向的改变
摘要:代码都是从自己用到从网上找来的 这些我用的没问题 储存下来 左右改变 [btn setTitleEdgeInsets:UIEdgeInsetsMake(0, -btn.imageView.bounds.size.width, 0, btn.imageView.bounds.size.width)];
阅读全文
tableView组头 组尾滑动
摘要:今天布局tableview 要组头组尾滑动 从网上找的代码 很实用 留下来 每天进步一下 - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (scrollView == self.detailsTableView) { UITab
阅读全文