会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
justqi
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2017年5月14日
根据个数创建按钮图标(上图下字)
摘要: /** * 创建方块view.m */ - (void)createSquares:(NSArray *)sqaures { // 一行最多4列 int maxCols = 4; // 宽度和高度 CGFloat buttonW = DQScreenW / maxCols; CGFloat buttonH = buttonW; ...
阅读全文
posted @ 2017-05-14 10:28 justqi
阅读(243)
评论(0)
推荐(0)
2017年5月13日
tabBar选中 刷新某页面
摘要: AppDelegate.m文件 @interface AppDelegate () //监听tabar点击事件,(DXDTabat.m代替之) #pragma mark - - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)vi...
阅读全文
posted @ 2017-05-13 21:42 justqi
阅读(1444)
评论(0)
推荐(0)
处理圆形图片(如头像)
摘要: // self.profileImageView.layer.cornerRadius = self.profileImageView.width * 0.5; // self.profileImageView.layer.masksToBounds = YES;//使用图层的话,在tableView偶尔会感觉有卡顿的现象 //UIImage+DXDExtension.h 使用分...
阅读全文
posted @ 2017-05-13 19:18 justqi
阅读(404)
评论(0)
推荐(0)
2017年5月10日
点击按钮tableview动态添加一行cell
摘要: -(void)addCell:(UIButton *)button{ NSMutableArray *indexPaths = [[NSMutableArray alloc] init]; NSInteger row = self.dataSource.count; NSIndexPath *indexPath = [NSIndexPath indexPathForRo...
阅读全文
posted @ 2017-05-10 09:30 justqi
阅读(5056)
评论(0)
推荐(0)
2017年4月17日
tabBarController 点击bar 传值
摘要: //没有导航 // OrderViewController *orderVC = [self.tabBarController.viewControllers objectAtIndex:2]; //有导航的 UINavigationController *temp = (UINavigationController...
阅读全文
posted @ 2017-04-17 19:30 justqi
阅读(998)
评论(0)
推荐(0)
2017年4月7日
UICollectionView
摘要: @interface AlbumDetailCollectionVC : UICollectionViewController - (void)viewDidLoad { [super viewDidLoad]; [self.collectionView registerNib:[UINib nibWithNibName:@"AlbumDetailCollectionVie...
阅读全文
posted @ 2017-04-07 19:50 justqi
阅读(175)
评论(0)
推荐(0)
2017年3月15日
导航栏返回上层页面刷新该页面tableView
摘要: 图中是tableView,点击cell,传model(包括点赞数等数据) 在下一页面修改了点赞数之后,同时修改model的点赞数(该model的地址还是一开始传进来的那个) 返回上层页面时执行 - (void)viewWillAppear:(BOOL)animated { //刷新页面 [self.
阅读全文
posted @ 2017-03-15 16:33 justqi
阅读(357)
评论(0)
推荐(0)
2017年3月12日
当没有数据时,设置一张背景图片提示无数据
摘要: #import "UIView+AutoLayout.h" @property (nonatomic, weak) UIImageView *noDataView; - (UIImageView *)noDataView { if (!_noDataView) { // 添加一个"没有数据"的提醒 UIImageView *noDataView = ...
阅读全文
posted @ 2017-03-12 13:13 justqi
阅读(5277)
评论(0)
推荐(0)
自定义cell设置现价,原价(加横线)
摘要: 原价,现价分别是连个label。这两个label不能直接限制死他们的宽度,因为他们的宽度不确定,而由于lable的特殊性,不设置它的宽度约束时,宽度取决于文字的内容,所以两个lable的约束设置好一些必要的约束即可,不用约束完整(特指宽度)。 对于有横线的lable使用自定义lable,在lable
阅读全文
posted @ 2017-03-12 12:45 justqi
阅读(425)
评论(0)
推荐(0)
2017年3月10日
美团自定义导航栏思路以及代码
摘要: 一.右边两个图标:直接添加两个UIBarButtonItem,其中各自添加UIButton,然后再设置button的图片,为了方便,使用分类自定义,UIBarButtonItem+DQCategory.h 二.左边加四个UIBarButtonItem,其中各自添加自定义的view,设置好xib的宽高
阅读全文
posted @ 2017-03-10 23:52 justqi
阅读(1740)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告