1

I want to update the content on current visible center view controller when selection change in right side bar, Left side bar : changes the center view Right side bar : lists items available, on selection change center view should update the content with current selection,

Created an extension class for UIViewController with a function,and overrided the function in all view controllers, but the call only goes to parent viewcontroller function not the actual centerview controller , following is the way i am trying to execute the function on right sidebar table view item tap

    let appdel = UIApplication.sharedApplication().delegate as! AppDelegate
let currentView = appdel.drawerContainer?.centerViewController
currentView.ProcessSelection(selectedString)

this executes the function in base class

extension UIViewController {
   func ProcessSelection(item:String){}
}

and ProcessSelection is overrideded at ViewController.swift but is not getting called

drac13
  • 112
  • 9

0 Answers0