ios - Interface builder constraint error -


a picture tells thousand words, here's image of uitableviewcell constraints.

enter image description here

i have view pinned edges of content view, , inside there's view fixed width , height, pinned bottom , top of superview. trying center x axis of view superview. running on device looks okay, interface builder throwing error on outer view, saying needs constraints y position or height. can somehow bypass in interface builder? or missing fundamental self-sizing table cells?

i sizing table cells with:

func tableview(tableview: uitableview, heightforrowatindexpath indexpath: nsindexpath) -> cgfloat {     return uitableviewautomaticdimension  }  func tableview(tableview: uitableview, estimatedheightforrowatindexpath indexpath: nsindexpath) -> cgfloat {     return uitableviewautomaticdimension } 

don't worry. have done right. warning ambiguity raised due 2 different heights of tableviewcell.

  1. height 20 arising due constraints.
  2. height provided (or default height i.e. 44) in size inspector.

just change cell height 21( or 20 if table view has no separators). ambiguity resolved.

note : 21, because cell height 1 + height of cell content view. 1 point separator line.

also if don't changes ui fine ambiguity solved @ run time height calculated fro content. hence height fed in ib overridden calculated height, hence no issues.

enter image description here


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -