ABPeoplePickerNavigationController changes with iOS8?

iOS 8 requires a new delegate method be implemented for this: – (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { } Keep the old delegate method in place to support iOS 7 or earlier. What I do in my app is call the iOS 7 delegate method from the iOS 8 delegate method: – (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:(ABRecordRef)person … Read more

Disable magnification gesture in WKWebView

You can prevent your users from zooming by setting the delegate of your WKWebKit’s UIScrollView and implementing viewForZooming(in:) as in the following: class MyClass { let webView = WKWebView() init() { super.init() webView.scrollView.delegate = self } deinit() { // Without this, it’ll crash when your MyClass instance is deinit’d webView.scrollView.delegate = nil } } extension … Read more

iOS8 – constraints ambiguously suggest a height of zero

Forcing a return height and estimated height made the warning disappear in my case. – (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath { return 44; } – (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 44; } Another solution where you don’t need the two overrides is simply to use self.tableView.rowHeight = 44; in your loadView or init method.

Why can’t I call the default super.init() on UIViewController in Swift?

The designated initialiser for UIViewController is initWithNibName:bundle:. You should be calling that instead. See http://www.bignerdranch.com/blog/real-iphone-crap-2-initwithnibnamebundle-is-the-designated-initializer-of-uiviewcontroller/ If you don’t have a nib, pass in nil for the nibName (bundle is optional too). Then you could construct a custom view in loadView or by adding subviews to self.view in viewDidLoad, same as you used to.

How to Implement iOS8 Interactive Notification

First you need to create the notification Action. Second you need to create the notification category and set its actions.You can set for two contexts. UIUserNotificationActionContextDefault or UIUserNotificationActionContextMinimal Third you need to create the notification setting and assign the above categories Fourth step would be to create local notification and assign it the identifier of … Read more