Closed kevinlee85 closed 7 years ago
How to pass variable from root UIViewController to child UIViewController?
struct PagingMenuOptions: PagingMenuControllerCustomizable { var componentType: ComponentType { let notificationPage_Booking = TabBarNotificationsViewController.StoryBoardInstance()! notificationPage_Booking.contextType = NotificationPageType.Booking let notificationPage_Payment = TabBarNotificationsViewController.StoryBoardInstance()! notificationPage_Payment.contextType = NotificationPageType.Payment return .all(menuOptions: MenuOptions(), pagingControllers: [notificationPage_Booking, notificationPage_Payment]) } }
I would like to pass one of vaiable from UIViewConroller to the notificationPage_Booking? How can I do it?
I got it, its Protocol type code. Let me add new variable to the customed Struct, then assign the variable on it.
How to pass variable from root UIViewController to child UIViewController?
struct PagingMenuOptions: PagingMenuControllerCustomizable { var componentType: ComponentType { let notificationPage_Booking = TabBarNotificationsViewController.StoryBoardInstance()! notificationPage_Booking.contextType = NotificationPageType.Booking let notificationPage_Payment = TabBarNotificationsViewController.StoryBoardInstance()! notificationPage_Payment.contextType = NotificationPageType.Payment return .all(menuOptions: MenuOptions(), pagingControllers: [notificationPage_Booking, notificationPage_Payment]) } }
I would like to pass one of vaiable from UIViewConroller to the notificationPage_Booking? How can I do it?