iphone - ios-How to resize the programitically created UILabel,UITextView,UITextfield in programitically created scroll view as per orientation change -


I created a programmatic sculveview that resizes according to the orientation. But the UI element fixed on the scroll view It is not that it is now I need to change the UILBlash, UITedView, UITdefold size which I tried to do with the code given below but it is not working for me.

  Sijiarti Tekstfildfrem = Sijiarkemkek (12.0, 20.0, Tekstwu. Frame. Size.width-20, textView.frame.size.height-424); // CGTtext TextfieldFrame = CGRactMake (12.0, 20.0, 270, 35); / * I had used fixed size for UITextField * textField = [[UITextField alloc] initWithFrame: textfieldFrame]; [TextField setAutoresizesSubviews: Yes]; [TextField Setautorizing Mask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]; TextField.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;  

Now I have to change the size of the elements according to the orientation change. Please help me solve this problem.

O Anupama Try This

  Uaianprfes orientation orientation = [Uaipeepisi Shared Share]. Statsbar Orientation; If (orientation == UIInterfaceOrientationLandscapeRight) orientation == UIInterfaceOrientationLandscapeLeft} {// frame for your scenario} if (orientation == UIInterfaceOrientationPortrait) {// Your frame to port}  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -