w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Properly dismissing either popover ViewController or modal ViewController

I use this

 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
     // The device is an iPhone or iPod touch.
 } else {
     // The device is an iPad => show library true popover.

This is not exactly what you ask for, but it have a good point : you can have the same segue identifier for both iPhone and iPad.

Now to have 1 similar method for both (popover / modalVC), may be you can add to both a new category with a method name dismissAnimated:

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.