In iOS versions prior to iOS 8, to check whether the device is iPhone 5/iPhone 5s, checking [UIScreen mainScreen].bounds.size.height == 568.0 was enough. But in iOS 8.x onwards, this check may fail as the bounds are now orientation dependant. I need a solution to identify the iPhone 5s, 6 and 6+ devices without checking the iOS version.
iOS 8.x alternative to detect iPhone 5s, using [UIScreen mainScreen].bounds.size.height == 568.0
931 Views Asked by AudioBubble At
2
There are 2 best solutions below
Related Questions in OBJECTIVE-C
- How do I customize NSOutlineView to have border color?
- UIWebView Screen Fitting Issue
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Image and Text locations in UIButton
- setting OpenGL version in objective-C
- Setup code for xibs in iOS. -awakFromNb:
- realm db, get parent link of object
- CFBundleDocumentType is not working in myproject-Info.plist file
- UIPopoverPresentationController not rendering properly
- Using Storyboard Reference
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Unexpected CALayer Vertical Flipping on 3D Rotation 'Bounce'
- Setting View orientation to portrait is ignored
- UITextField append / between dates while enforcing character limit
Related Questions in IOS8
- UIPopoverPresentationController not rendering properly
- UICollectionView cell height/scrollable content behaving strange/incorrect
- My application has the camera access permission by default.How can i turned it off and ask for permission?
- iOS coordinates for iPad and iPhone game using spritekit
- App crashes when I deselect an item in a UICollectionView
- Swift - Issue trying to access to Singleton object
- how to hide the section title when clicked search bar using ios 8 UISearchController?
- poptorootviewcontroller and instruct rootviewcontroller to perform some action
- Animation issue on iOS 7 but not on iOS 8
- Javascript function not getting called from HTML file
- Table View Cell After Upgrading Project from XCODE 5.x to 6.x
- Third party app iOS Storage usage statistics
- UI Local Notification - Background Reschedule
- Reposition legal label ( MKAttributionLabel )
- How can I animate an SKShapeNode in swift?
Related Questions in IPHONE-5
- iOS: test app for iPhone in iPad, screen size
- How to fix iPhone screen width using 4 inch storyboard using auto layout?
- iOS 8.x alternative to detect iPhone 5s, using [UIScreen mainScreen].bounds.size.height == 568.0
- Xcode 6.1 not showing launch image on ios 8.1
- How to detect iPhone 5 screen in iOS 8
- iPhone6 View is not displaying properly in iPhone5
- I can not install ipa on my device
- How to consolidating the translucency of the navigation bar between iPhone 5S and 5?
- IOS app crashes on iPhone 5
- Xcode quit unexpectedly while using the dsc_extractor.bundle plugin
- Custom Tableview getting crash in iPhone5(iOS7)
- The iPhone 5 has 3 mics. Can I change from which one I'm recording?
- setting image on UITabBar shows an extra line on Image
- Perform action as soon as camera opens ios
- UIImagePickerViewController camera preview black screen on iPhone 5 working fine on 4S
Related Questions in BOUNDS
- Need a sort of a reverse CATransform3d
- Update bounds in Angular-Google-Maps
- Rotation and getBounds() in Phaser
- How to findObject in UiAutomator using position on screen (bounds)
- getClientRects is not working for image in safari or chrome
- How to get the exact point of objects in swift?
- I keep getting an index out of bounds error and dont know why
- error: incompatible types: inference variable R has incompatible bounds (Lambda java 8)
- javaFX- what is getBoundsInLocal() ,getBoundsInParent() method?
- get google place bounding box from google maps api
- How to make circular clip bounds for ViewGroup
- c# how to apply WindowState, FormBorderStyle and Bounds changes to multiple forms at once?
- iOS 8.x alternative to detect iPhone 5s, using [UIScreen mainScreen].bounds.size.height == 568.0
- Bound a Leaflet map to many layers
- Algorithm: How to find closest element, having coordinates and dimension
Related Questions in MAINSCREEN
- iOS 8.x alternative to detect iPhone 5s, using [UIScreen mainScreen].bounds.size.height == 568.0
- Open a MainScreen from another MainScreen
- Android Main Screen glitch on Rapberry Pi3
- WPF : Keep the window maximized when switch main screen
- Name mainscreen is not defined
- Blackberry: select item in a list, return to previous screen
- BlackBerry - MainScreen with labels vertical scroll
- Screen height for iPhone4 with 4-inch screen
- UIScreen mainScreen bounds different between simulator and actual device on iOS8
- RelativeLayout params for main screen widget
- How to make the windows form open only on the main screen
- Switch pages/classes in BlackBerry
- Making a main screen in Ursina
- How to call and pass other mainscreen?
- Detecting iPhone 6 and plus
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I was able to detect the devices using the following macros. This will be useful if you want identify the device, to perform some update on views(like updating frames on orientation changes). If you exactly want the device model/make, use this link (ios iphone get device model and make?) instead.