dulal_026
dulal_026

Reputation: 579

UIImageview position change programmatically iPhone

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

Answers (1)

Mundi
Mundi

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

Related Questions