It looks like you're new here. If you want to get involved, click one of these buttons!
[[UIScreen mainScreen] bounds]
Stoff81 wrote: »
Hi, you may also want to verify that the screen dimensions take the staus bar into account (20 pixels). What i usually so is just store the dimensions manually...320 x 460 portrait and 480x300 in landscape. the nice thing about developing on iphone is that theres only one screen size. completely different story when developing apps for multiple devices
PhoneyDeveloper wrote: »
Apparently the width and height reported by UIScreen bounds don't change when the device rotates so if your app can work rotated you may need to consider that.
CGRect cgRect =[[UIScreen mainScreen] bounds];
CGSize cgSize = cgRect.size;
txtmail = [[UITextField alloc] initWithFrame:CGRectMake(0, cgSize.height/2, cgSize.width, 30) ];
txtmail.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;