摘要: /** * 创建方块view.m */ - (void)createSquares:(NSArray *)sqaures { // 一行最多4列 int maxCols = 4; // 宽度和高度 CGFloat buttonW = DQScreenW / maxCols; CGFloat buttonH = buttonW; ... 阅读全文
posted @ 2017-05-14 10:28 justqi 阅读(236) 评论(0) 推荐(0) 编辑
摘要: AppDelegate.m文件 @interface AppDelegate () //监听tabar点击事件,(DXDTabat.m代替之) #pragma mark - - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)vi... 阅读全文
posted @ 2017-05-13 21:42 justqi 阅读(1435) 评论(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 阅读(387) 评论(0) 推荐(0) 编辑
摘要: -(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 阅读(5005) 评论(0) 推荐(0) 编辑
摘要: //没有导航 // OrderViewController *orderVC = [self.tabBarController.viewControllers objectAtIndex:2]; //有导航的 UINavigationController *temp = (UINavigationController... 阅读全文
posted @ 2017-04-17 19:30 justqi 阅读(983) 评论(0) 推荐(0) 编辑
摘要: @interface AlbumDetailCollectionVC : UICollectionViewController - (void)viewDidLoad { [super viewDidLoad]; [self.collectionView registerNib:[UINib nibWithNibName:@"AlbumDetailCollectionVie... 阅读全文
posted @ 2017-04-07 19:50 justqi 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 图中是tableView,点击cell,传model(包括点赞数等数据) 在下一页面修改了点赞数之后,同时修改model的点赞数(该model的地址还是一开始传进来的那个) 返回上层页面时执行 - (void)viewWillAppear:(BOOL)animated { //刷新页面 [self. 阅读全文
posted @ 2017-03-15 16:33 justqi 阅读(350) 评论(0) 推荐(0) 编辑
摘要: #import "UIView+AutoLayout.h" @property (nonatomic, weak) UIImageView *noDataView; - (UIImageView *)noDataView { if (!_noDataView) { // 添加一个"没有数据"的提醒 UIImageView *noDataView = ... 阅读全文
posted @ 2017-03-12 13:13 justqi 阅读(5181) 评论(0) 推荐(0) 编辑
摘要: 原价,现价分别是连个label。这两个label不能直接限制死他们的宽度,因为他们的宽度不确定,而由于lable的特殊性,不设置它的宽度约束时,宽度取决于文字的内容,所以两个lable的约束设置好一些必要的约束即可,不用约束完整(特指宽度)。 对于有横线的lable使用自定义lable,在lable 阅读全文
posted @ 2017-03-12 12:45 justqi 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 一.右边两个图标:直接添加两个UIBarButtonItem,其中各自添加UIButton,然后再设置button的图片,为了方便,使用分类自定义,UIBarButtonItem+DQCategory.h 二.左边加四个UIBarButtonItem,其中各自添加自定义的view,设置好xib的宽高 阅读全文
posted @ 2017-03-10 23:52 justqi 阅读(1626) 评论(0) 推荐(0) 编辑