This allows to support both orientations for the iPhone. We now use a RootViewController for this, instead of relying only on the PhoneMainView. The root view controller is in charge of swapping the portrait-only and the landscape PhoneMainView when needed. It also inherits the view stack management, since we now have 2 phone main views. This is a bit convoluted, but necessary to handle the ChatRoom and the InCall views for the iPhone
1.1 KiB
Quick UI reference for Linphone iOS:
- The app is contained in a window, which resides in the MainStoryboard file.
- The delegate is set to LinphoneAppDelegate in main.m, in the UIApplicationMain() by passing its class
- Basic layout:
MainStoryboard | | (rootViewController) | PhoneMainView ---> view #--> app background | | | #--> statusbar background | | (mainViewController) | UICompositeViewController : TPMultilayout | #---> view #--> stateBar | #--> contentView | #--> tabBar
When the app is started, the phoneMainView gets asked to transition to the Dialer view or the Wizard view. PhoneMainView exposes the -changeCurrentView: method, which will setup its Any Linphone view is actually presented in the UICompositeViewController, with or without a stateBar and tabBar.
The UICompositeViewController consists of 3 areas laid out vertically. From top to bottom: StateBar, Content and TabBar. The TabBar is usually the UIMainBar, which is used as a navigation controller: clicking on each of the buttons will trigger a transition to another "view".