There is a problem with the text view that's been programmatically created. It just pops up to ~20px at iPhoneX, but looks perfect at iPhone 8. I'll be super grateful for any hints :) Screenshots attached.
iPhoneX: http://prntscr.com/lcnh2y iPhone 8: http://prntscr.com/lcnhns
Code:
let rect = CGRect(x: 20, y: self.tabsSegmentedControl.layer.position.y + 20, width: self.tabsSegmentedControl.layer.frame.width, height: 127)
self.ingredientsTextView = UITextView(frame: rect)
ingredientsTextView.isEditable = false
ingredientsTextView.isSelectable = false
self.view.addSubview(ingredientsTextView)
Use viewDidLoad for Creation and WillLayout for positioning. I don't recommend mixing Storyboard and programmatically creation of the UI
class ViewController: UIViewController {
}