Detect if the device is iPhone X

0 votes

The UINavigationBar in my iOS app has a custom height, which causes issues on the iPhone X.

Exists a reliable way to programmatically determine whether an app is running on an iPhone X (in Objective-C)?

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
    if (screenSize.height == 812)
        NSLog(@"iPhone X");
}

The real query is: "Can I determine whether the current device is an iPhone X directly, such as through an SDK feature, or do I need to use indirect measurements?"​

Nov 16, 2022 in IOS by Soham
• 9,710 points
333 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In IOS

0 votes
1 answer

Is it possible to run .APK/Android apps on iPad/iPhone devices?

It is not possible to run Android ...READ MORE

answered Sep 20, 2022 in IOS by Aditya
• 7,680 points
4,580 views
0 votes
1 answer

How is a rounded rect view with transparency done on iphone?

view.layer.cornerRadius = radius; The difficult technique is to ...READ MORE

answered Sep 22, 2022 in IOS by Rahul
• 9,680 points
955 views
0 votes
0 answers

iOS Custom Notification Sound (UNNotificationSound) doesn't play when iPhone is locked

I edit the notification before showing it ...READ MORE

Sep 22, 2022 in IOS by Soham
• 9,710 points
848 views
0 votes
0 answers

What is the equivalent of apk in iOS?

What is the equivalent of apk in ...READ MORE

Sep 27, 2022 in IOS by Soham
• 9,710 points
427 views
0 votes
0 answers

Detect headset button click on iPhone SDK

Is it possible to hear the play/pause ...READ MORE

Sep 28, 2022 in IOS by Soham
• 9,710 points
432 views
0 votes
1 answer

Why does the NFC range of an iPhone improve with an application?

I'm not familiar with iPhone, but I ...READ MORE

answered Nov 4, 2022 in IOS by Rahul
• 9,680 points
580 views
0 votes
1 answer

Detect if the device is iPhone X

The response to your query is "no" ...READ MORE

answered Nov 8, 2022 in IOS by Rahul
• 9,680 points
1,012 views
0 votes
1 answer

Getting country calling prefix

For a class that offers both this ...READ MORE

answered Sep 20, 2022 in Others by Aditya
• 7,680 points
840 views
0 votes
1 answer

Is there a way to to check if a picture was taken on that iPhone?

Actually, the model and manufacturer information is ...READ MORE

answered Sep 22, 2022 in IOS by Rahul
• 9,680 points
660 views
0 votes
0 answers

How to receive single tap and hold Remote-Control Event with iOS

I'm looking for my app to listen ...READ MORE

Nov 8, 2022 in Mobile Development by gaurav
• 23,260 points
451 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP