Reputation: 579
I have create a iPhone quiz application where some questions have image and some is without image. For this I took a UItextfield
for displaying question and a UIImageView
for displaying question Image. But when question without image is appears then the question is displayed upper size of the xib and options are displayed lower side of the xib which is not good. I want to change the position of the image view and text field with correspond to question image. How can i change the position of uicontrol?. Plz help me. Thanks in advanced.
Upvotes: 0
Views: 3576
Reputation: 80273
This is how you reposition / resize a UIView.
CGRect frame = myControl.frame;
frame.origin.x = newX;
frame.origin.y = newY;
frame.size.width = newWidth;
frame.size.height = newHeight;
myControl.frame = frame;
Upvotes: 3