1

I`ve created a subview containing a UIPickerView that slides on the main view occupying half of the screen. When the user selects a value in the picker I update a UILabel that is located in the main view (behind). And then the problem occurs, because since after I set the UILabel value, the position of the subview is set to its initial size, changing its position and confusing my app. What I need is to set the UILabel in the main view without changing the actual position of the subview. Have an idea?

bobs
  • 21,844
  • 12
  • 67
  • 78
Pastro
  • 11
  • 1
  • 1
    This is a common symptom of having autolayout turned on, in which there are constraints that dictate the location of controls, and thus thwart attempts to change the `frame` or `center` manually, but it will only manifest itself when it updates the view for other reasons (e.g. setting label `text`). Either turn off autolayout or move the control by changing the constraints. See http://stackoverflow.com/a/14433016/1271826 – Rob Apr 17 '13 at 23:52

0 Answers0