CNContactViewController forUnknownContact unusable, destroys interface

I’ve hidden the UINavigationController method for show or hide the navigation bar by using categories: @interface UINavigationController (contacts) @end @implementation UINavigationController (contacts) – (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated { NSLog(@”Hide: %d”, hidden); } @end This way the CNContactViewController cannot make the navigation bar to disappear. Setting a breakpoint on NSLog I discovered that this method is called by … Read more

iOS9 Swift File Creating NSFileManager.createDirectoryAtPath with NSURL

I figured this one out. createDirectoryAtPath() is unable to process a path with the “file://” prefix. To get a path without the prefix you must use path() or relativePath(). let documentsPath = NSURL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0]) let logsPath = documentsPath.URLByAppendingPathComponent(“logs”) do { try NSFileManager.defaultManager().createDirectoryAtPath(logsPath.path!, withIntermediateDirectories: true, attributes: nil) } catch let error as NSError { … Read more

How can I figure out which URL is being blocked by App Transport Security?

Editor Note: @jessedc points out in the comments below the link to the official Apple documentation on how to do this: https://developer.apple.com/library/content/qa/qa1887/_index.html Okay, I have an answer I don’t like! I still very much want a better one. In my application:didFinishLaunchingWithOptions: method I added the line setenv(“CFNETWORK_DIAGNOSTICS”, “3”, 1); When I ran the app then, … Read more

iOS 9 UITableView separators insets (significant left margin)

Okay, I have found out the solution. The only thing required for that is to set on the presenting instance of UITableView that flag cellLayoutMarginsFollowReadableWidth myTableView.cellLayoutMarginsFollowReadableWidth = NO; I wanted to find some reference in the documentation but it looks like it is not ready yet, only mentioned on diff page. As the flag was … Read more

What does the shrink-to-fit viewport meta attribute do?

It is Safari specific, at least at time of writing, being introduced in Safari 9.0. From the “What’s new in Safari?” documentation for Safari 9.0: Viewport Changes Viewport meta tags using “width=device-width” cause the page to scale down to fit content that overflows the viewport bounds. You can override this behavior by adding “shrink-to-fit=no” to … Read more