forkingdog / UITableView-FDTemplateLayoutCell

Template auto layout cell for automatically UITableViewCell height calculating
MIT License
9.94k stars 2.01k forks source link

像微博那种风格,图片可能有行数可能是0/1/2的tableCell,利用该框架能实现吗? #279

Closed chipengliu closed 7 years ago

chipengliu commented 7 years ago

像微博那种风格,图片可能有行数可能是0/1/2的tableCell,利用该框架能实现吗? 我采用了是autolayout的方法,模仿demo的写法在configureCell里面主动修改image的高度貌似没有效果

afantree commented 7 years ago

可以的实现。 如果要我实现,我会配合UIView-FDCollapsibleConstraints 或者 StackView 来实现

chipengliu commented 7 years ago

@afantree
我autolayout的方法,图片大小会跳动

chipengliu commented 7 years ago

有个问题需要请教你一下, 我想做一个类似微博那样的tableView,但是采用autolayout的方法还是达不到想要的效果, 我tableviewcell是这样的,场地名称这一行的所有label都是上、左、右三方向对其附近的控件 price 和 地址 分别上、左、右对对齐cell time 下、左、右对其cell 最左边的UIImageView左边对其cell,Top对其地址,bottom对其time,其他UIimageView对其第一个,间距都是15 出来的效果imageView大小会跳动,请问如果进行autolayout布局才是正确的??

在 2017年2月13日,下午1:19,Afantree notifications@github.com 写道:

可以的实现。 如果要我实现,我会配合UIView-FDCollapsibleConstraints 或者 StackView 来实现

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/forkingdog/UITableView-FDTemplateLayoutCell/issues/279#issuecomment-279296744, or mute the thread https://github.com/notifications/unsubscribe-auth/APfAtPdo7wpMgoMNedIFvwDGw9NL0R11ks5rb-f8gaJpZM4L-gnM.

chipengliu commented 7 years ago

有个问题需要请教你一下, 我想做一个类似微博那样的tableView,但是采用autolayout的方法还是达不到想要的效果, 我tableviewcell是这样的,场地名称这一行的所有label都是上、左、右三方向对其附近的控件 price 和 地址 分别上、左、右对对齐cell time 下、左、右对其cell 最左边的UIImageView左边对其cell,Top对其地址,bottom对其time,其他UIimageView对其第一个,间距都是15 出来的效果imageView大小会跳动,请问如果进行autolayout布局才是正确的??

在 2017年2月13日,下午1:19,Afantree notifications@github.com 写道:

Closed #279 https://github.com/forkingdog/UITableView-FDTemplateLayoutCell/issues/279.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/forkingdog/UITableView-FDTemplateLayoutCell/issues/279#event-959034131, or mute the thread https://github.com/notifications/unsubscribe-auth/APfAtPdo7wpMgoMNedIFvwDGw9NL0R11ks5rb-f8gaJpZM4L-gnM.

afantree commented 7 years ago

出来的效果imageView大小会跳动是不是触发了哪一个 animation ? 添加一个

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0];
//code
[UIView commitAnimations];

试试?