linphone-ios/UI.md
Guillaume BIENKOWSKI dc04af32b4 Dynamically change the root view controller, so that when we transition from a portrait-only to a landscape-friendly view.
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
2014-10-02 16:27:23 +02:00

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".