6 Replies
      Latest reply on Oct 19, 2019 1:44 PM by XofDyer
      XofDyer Level 1 Level 1 (0 points)

        I am trying to develop an information based app with auto layout. Most of the pages are UITableViews, built in IB with static cells containing a simple text field. I would like the width of the text fields to automatically expand and the height to reduce if the device is rotated into landscape more, or if initially opened on a larger device.


        Using autolayout, I am seeing in most cases that the width does automatically expand to fill the horizontal space. However, the height does not seem to reduce, which leaves in some cases a lot of space - a large margin - beneath the text. First question, how do I avoid this?


        In some cases, the width does NOT expand across the screen, but an arbitrary margin seems to be set. This is sometimes applied to the entire text field within a table view cell, but in one case, the top two paragraphs extend across the screen, but the bottom paragraphs have a much larger right margin - which looks terrible.


        I am not sure how to add images here, so put them here: https://stackoverflow.com/questions/58410325/how-to-control-the-right-margin-of-my-uitextfield