I'm using a Xib file and code programmatically to create a custom keyboard. I want different buttons based on the phone the user uses. Vary for traits does not exactly work for what I want. I'd rather make multiple Xib files and have them show based on the on the phone size of the user. Anyone have any idea how I can do this?
Asked
Active
Viewed 120 times
0
-
You could load the xib or storyboard file programmatically based on the screen size for instance. – LinusGeffarth Jul 05 '17 at 16:58
1 Answers
0
You can use this answer to grab the user's device model: Device Model and then load in your Xib according to what the user is currently using.
let vc = UIViewController(nibName: "name", bundle: nil)

Jacob Boyd
- 672
- 3
- 19