This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. First Create a Dummy UIViewController that has a root relation with the UITabBarController | |
// 2. Make this controller implement a UITabBarControllerDelegate | |
// 3. In ViewDidLoad: | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.tabBarController?.delegate = self | |
} | |
// 4. Implement this delegate method: | |
func tabBarController(tabBarController: UITabBarController, didSelectViewController viewController: UIViewController) { | |
let isModalTab = viewController == self |
OlderNewer