Wednesday, July 20, 2011

How to Find Device Width and Height in iOS SDK

CGRect screenBounds = [[UIScreen mainScreen] bounds];
NSString *width=[NSString stringWithFormat:@"%g",screenBounds.size.width ];
NSString *height=[NSString stringWithFormat:@"%g",screenBounds.size.height ];
ight %@", width,height,NSStringFromCGRect(screenBounds));

No comments:

Create a list in SwiftUI with sticky section headers

 Sample Code import SwiftUI struct ContentView : View {     @State var isCustomViewControllerDisplayed = false     @State private va...