SAP-archive/Fiori-for-iOS-Roadshow-2019

Change appDelegate extension to extend UIViewController

Opened this issue · 0 comments

Currently the advice says one should add the following to the app delegate
extension UITableViewController {

    var appDelegate: AppDelegate { return (UIApplication.shared.delegate as! AppDelegate) }
   }

However changing it to

extension UIViewController {
    var appDelegate: AppDelegate { return (UIApplication.shared.delegate as! AppDelegate) }
   }

ensures it will work for any view controller subclass including a UIViewController that includes a table.