Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I hide controls and cause others to shift place in iOS?
    primarykey
    data
    text
    <p>I'm programming an app for iOS 7 in Xcode 5.</p> <ol> <li><p>I have three text boxes at the top of my page, each right above the other. Let's call them topTextBox, middleTextBox, and bottomTextBox.</p></li> <li><p>My intent is that depending on a particular condition, the topTextBox might not be visible (or present, really) when the view loads.</p></li> <li><p>If topTextBox isn't present (or hidden, or whatever) I would like middleTextBox and bottomTextBox to be placed further up the page...as if topTextBox wasn't ever there in the first place (so middleTextBox is in the spot topTextBox used to be in, and bottomTextBox is in the spot middleTextBox was in).</p></li> </ol> <p>I'm using storyboards with AutoLayout ON. I can't seem to figure out what to do with the constraints for each of the three textBoxes to make this work. Making middleTextBox and bottomTextBox sit higher on the page when topTextBox is hidden doesn't need to be dynamic--I make the decision to show or not show topTextBox in ViewDidLoad()--I just need to get them to show up in the right place depending on my conditions.</p> <p>Questions:</p> <p>a. Is making topTextBox.hidden = YES the right way to get topTextBox to not be shown? Or is there some way to make it not noticed by the view at all?</p> <p>b. What do I do with these constraints on middleTextBox and bottomTextBox to move them up on the page in this condition?</p> <p>c. Is there anything else I should know to get this to work that I'm not thinking of? Perhaps a better method?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload