My app has navigational control i have 2 UIViewController. viewCon1 is initial view controller.
I then Pushed the viewCon2 in navigational control. Now i want to access variables and func of viewCon1 in viewCon2 without static logic.
I used static func logic to get Self of viewCon1 i.e. WK_DshBrd
let dashBoardObj = WK_DshBrd.getDasBoardObject() as! WK_DshBrd
dashBoardObj.unReadMsgsCaseArr?.append(caseNo)
But i get following error on runtime
Could not cast value of type 'Watch_Extension.WK_DshBrd' (0x7f1e0) to 'Watch_Extension.WK_DshBrd' (0x7ed78).
How can i cast it or achieve required functioanlity in alternative way?