Nsstring *str  = yes ? @"hhh" : @"yyy";

一开始图片文件夹层次结构不对,  当你把图片拖进去,就对了, 一开始没有内容,所以位置不对

uitableview group模式顶部有个空白

// 时间日期蓝条

// 计算imageView长度

NSString *dotaLocationString = @"4/15日在呼伦贝尔";

CGFloat labelWidth = [dotaLocationString sizeWithFont:kFontWithSize(11) constrainedToSize:CGSizeMake(MAXFLOAT, 20)].width;

dateLocationImageView =[[UIImageView alloc]init];

[self.contentView addSubview:dateLocationImageView];

[dateLocationImageView mas_makeConstraints:^(MASConstraintMaker *make) {

make.right.mas_equalTo(0);

make.width.mas_equalTo(labelWidth + 16); // 132

make.height.mas_equalTo(20);

make.top.mas_equalTo(self.contentView).offset(12);

}];

UIImage * image = [UIImage imageNamed:@"推荐热度背景"];

UIEdgeInsets insets = UIEdgeInsetsMake(0, 10, 0, 0);

// 指定为拉伸模式,伸缩后重新赋值

image = [image resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch];

dateLocationImageView.image = image;

dataLocationLabel = [UILabel hdf_labelWithText:@"4/15日在呼伦贝尔" superView:dateLocationImageView constraints:^(MASConstraintMaker *make) {

make.left.mas_equalTo(8);

make.centerY.mas_equalTo(dateLocationImageView);

}];

dataLocationLabel.font = [UIFont systemFontOfSize:11];

dataLocationLabel.textColor = [UIColor whiteColor];

--------

降低约束优先级

价格被挤压了, 降低约束优先级,解决问题

// 价格label

priceLabel = [UILabel hdf_labelWithText:@"¥1000"

textColor:kAssistOrangeColor

font:kFontWithSize(12)

superView:self.contentView

constraints:^(MASConstraintMaker *make) {

make.right.mas_equalTo(preTimeLabel.mas_left).offset(1);

make.baseline.mas_equalTo(preTimeLabel);

}];

// 职称

doctorProfessionRank = [UILabel hdf_labelWithText:@"职称safdsafasfasfsadfasfsafaaf"

textColor:kColorWith16RGB(0x646464)

font:kFontWithSize(12)

superView:self.contentView constraints:^(MASConstraintMaker *make) {

make.left.equalTo(doctorName);

make.top.equalTo(doctorName.mas_bottom).offset(5);

make.right.equalTo(priceLabel.mas_left).offset(-15).priority(750);

}];

------

collectionView cell方法 不调用,因为collectionView的frame不对

//        _collectionView = [[UICollectionView alloc]initWithFrame:self.collectionViewContainerView.bounds collectionViewLayout:self.flowLayout]; // bouns出不来

_collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_W, self.collectionViewContainerView.width) collectionViewLayout:self.flowLayout]; // 这样能出来!!

------

view没有加载上来,因为下划线变量没有调用懒加载

最新文章

  1. C++常见问题: 字符串分割函数 split
  2. Word,PDF,PPT,TXT之间的转换方法
  3. GCD的基本知识
  4. Angulajs系列-01-入门
  5. CentOS 7.2 安装教程
  6. 第48套题【tarjan】【图&树的连通性】【并查集】
  7. hdu 4719 动态规划
  8. #include< > 和 #include” ” 的区别
  9. Zookeeper实现分布式选举算法
  10. fork 函数的一点学习
  11. twisted是python实现的基于事件驱动的异步网络通信构架。
  12. 浅谈JavaScript中的柯里化函数
  13. EGL接口介绍-----Android OpenGL ES底层开发
  14. (转)CentOS 7.0关闭默认防火墙启用iptables防火墙
  15. Core Java 简单谈谈HashSet
  16. 描述性统计指标 - 众数 Mode
  17. 运维chroot语法
  18. 使用SQL SERVER 来自动发送邮件
  19. [20181105]再论12c set feedback only.txt
  20. prufer序列学习笔记

热门文章

  1. 【现代程序设计】homework-09
  2. hbase shell中log4j重复问题
  3. 【JUnit 报错】 method initializationerror not found:JUnit4单元测试报错问题
  4. Linux常用命令_(安装包管理)
  5. spring实战一:装配bean之注入Bean属性
  6. HDU3729 I'm Telling the Truth(字典序最大的最大流)
  7. Mesh系列文章 - 自定义Mesh
  8. BZOJ3578 : GTY的人类基因组计划2
  9. HDU 4511 (AC自动机+状态压缩DP)
  10. Lambda表达式可以被转换为委托类型