In an XCode iPad application, I use a storyboard with a view and an UIImageView inside, defined in the Interface Builder. If I try to change the location of the UIImageView using the SetFrame command [myImageView setFrame:CgRectMake...], the image does not change position on the screen. Is the setFrame command enough ? Thanks.
Asked
Active
Viewed 1,034 times
1
-
Just found the answer here: http://stackoverflow.com/questions/9566789/remove-autolayout-constraints-in-interface-builder – Laurent Crivello Mar 17 '13 at 20:20
-
See if you connected the outlets , also check for Auto-Layout disbaled – Abhishek Singh Mar 17 '13 at 20:22
2 Answers
7
I would go through a checklist and see that the setup is good:
- Check your IBOutlet - if your UIImageView isn't hooked up, nothing you try calling on it will work.
- Check the autoresize mask - If this is a non-trivial layout where some views are nested within one another, there might be unexpected results.
- Make sure you're not using Autolayout - This can be done by selecting the storyboard itself and making sure the "Use Autolayout" checkbox within the file inspector (cmd+alt+1) is not ticked (Ticked by default).

Stavash
- 14,244
- 5
- 52
- 80
0
I'm not sure but does the UIImageView need to be redrawn after you change it's location as this is often the case in programming?

CreativeAbyss
- 313
- 1
- 18