for example, create uitableview in storyboard , want uitableviewcell fixed proportion (e.g. 16:1).
example: if on 5s, want
uitableviewcellframe(width:320, height:20).example: if on 6plus, want
uitableviewcellframe(width:640, height:40).
for uitableviewcell it's easy, implement method in uitableviewdelegate:
func tableview(tableview: uitableview, heightforrowatindexpath indexpath: nsindexpath) -> cgfloat { return tableview.frame.size.width / 16.0 } and in order place subviews accordingly, you'd need add constraints them. else uitableviewcell little tricky, again - autolayout , constraints friends.
Comments
Post a Comment