Updating React Navigation’s navigation bar title with a scene object

NOTE: This version is based on React Navigation 1.0.0-beta.6

After moving to React Native Navigation

In a previous post, we shared how we restructured an app with React Navigation. We loved how Navigation could route and transit our app flow. We resolved our previous problem with Navigator, which suffered performance problems once more operations were added to the JS Thread. But then we encountered another issue with React Navigation’s rendering of our navigation bar. In this piece below, we outline how we introduced the scene object to update the navigation bar content.
Continue reading “Updating React Navigation’s navigation bar title with a scene object”

VIPER – iOS App Architecture Beyond MVC (Mega-ViewController)

The MVC Architecture is generally used in developing iOS applications.

However the “ViewController” approach widely used is the most evil part that messes up Views and Controllers: Developer writes both view animation and business logic in the UIViewController, hence introducing a MEGA-ViewController.

In this passage, we will share our experience on how VIPER saves our lives from this monster in one of our projects.

VIPER is not a framework  but an approach to iOS application architecture, which stands for:

  • View
  • Interactor
  • Presenter
  • Entity
  • Routing(Wireframe)

The “MVC” monster

mega-viewcontroller monsterTypical Model objects are simple, they are just NSManagedObject.

View and Controller are wrapped in a single UIViewController class. The UIViewController class constraints the fundamental view management of the iOS app. As the name convention suggests,  view controllers often handle both business logics and logics for responding to user interactions.

Continue reading “VIPER – iOS App Architecture Beyond MVC (Mega-ViewController)”