How to use new San Francisco font in iOS 9?

In iOS 9 it is the system font, so you could do: let font = UIFont.systemFontOfSize(18) You can use the font name directly, but I don’t think this is safe: let font = UIFont(name: “.SFUIText-Medium”, size: 18)! You can also create the font with specific weight, like so: let font = UIFont.systemFontOfSize(18, weight: UIFontWeightMedium) or … Read more

UIAlertController – add custom views to actionsheet

UIAlertController extends UIViewController, which has a view property. You can add subviews to that view to your heart’s desire. The only trouble is sizing the alert controller properly. You could do something like this, but this could easily break the next time Apple adjusts the design of UIAlertController. Swift 3 let alertController = UIAlertController(title: “\n\n\n\n\n\n”, … Read more

iOS 9 searchBar disappears from table header view when UISearchController is active

I’m not sure what exactly is the problem but I ‘fixed’ it by: self.searchController.hidesNavigationBarDuringPresentation = NO; self.definesPresentationContext = NO; My guess is that UISearchController is doing something funky when it is trying to present as a navigation bar. So, this is a hack but it at least doesn’t block the user. The search bar doesn’t … Read more

What is the impact of the “Requires full screen” option in Xcode for an iPhone-only app?

There is no impact at all. Apple engineers thinks that its not required to hide, or may be Plus phones will get landscape slide over in later iOS versions 🙂 From the documentation: To opt out of being eligible to participate in Slide Over and Split View, add the UIRequiresFullScreen key to your Xcode project’s … Read more