I have an old app source code that uses storyboard & xib without auto layout or size classes. Even though I am rewriting it from scratch, it would take some time as number of modules are too many. The immediate need is to fix the code that manually sets frame of UI elements by detecting screen size at runtime. So a code written this way places elements outside the safe area:
self.controlBarBkg568h.frame = CGRectMake(0, CGRectGetHeight(self.view.bounds) - tapBarBackgroundImage.size.height, CGRectGetWidth(self.view.bounds), tapBarBackgroundImage.size.height);
Since there are so many interface elements that are placed this way, I am wondering what is an easy way to fix the code that works on iPhone X?