How to distinguish in code between the new iPadPro with a home bar and the old one with the home button?

49 views Asked by At

I want to change constraints programmatically depending on whether the app is run on the old iPad Pro with home button, or the new one with the home bar (swiping indicator) (3rd generation iPad Pro). How can I make that distinction in Swift since they both have the same screen size - 12.9 inches. Is there some built-in flag?

I found the answer here by using the extension UIDevice: https://stackoverflow.com/a/26962452/6217970

0

There are 0 answers