Wednesday, December 26, 2012

How to check Retina display available in phone ?

+ (BOOL) isRetinaDisplay
{
 int scale = 1.0;
 UIScreen *screen = [UIScreen mainScreen];
 if([screen respondsToSelector:@selector(scale)])
  scale = screen.scale;
 
 if(scale == 2.0f) return YES;
 else return NO;
}

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...