Related questions
UIScreen MainScreen Bounds returning wrong size
So I created a new project with the latest version of XCode and tried to log the screen size of my app (to determine the device type for UI). I ran the following code from my iPhone 5:
NSLog(@"%f", [[UIScreen …
How to get iPhone screen size programmatically?
Possible Duplicate:
How to get screen size using code?
NSLog(@"Top Left View : Width %f height%f",self.topLeftView.frame.size.width,self.topLeftView.frame.size.height);
I have dragged the "View" from object library and put it on xib …
Capturing full screenshot with status bar in iOS programmatically
I am using this code to capture a screenshot and to save it to the photo album.
-(void)TakeScreenshotAndSaveToPhotoAlbum
{
UIWindow *window = [UIApplication sharedApplication].keyWindow;
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
UIGraphicsBeginImageContextWithOptions(window.bounds.size, NO, [UIScreen mainScreen].scale);
else
…