cuappdev/ithaca-transit-ios

Refactor banner / connection implementation

Closed this issue · 3 comments

self.banner is inconsistently set and handled on several view controllers. Many of these actions are spread across the interfaces, and could be cleanly implemented once in CustomNavigationController or some shared class / protocol.

  • Every view should dismiss banners upon viewWillDisappear and reset the status bar.
  • The status bar should be changed using preferredStatusBarStyle, which can be set based on a boolean indicating the status.
  • All banners should have the same settings (autoDismiss, dismissOnTap, etc.)

Additionally, I believe we can have one instance of Reachability that works throughout the app.

Update

If getBusLocations returns success : false, a banner does not show on RouteDetailViewController. Should make sure this error appears, and any other potential errors.

Update

Banners currently do not dismiss when internet is re-connected. Fix!

I don't think we need a protocol for this implementation, since each view handles these tasks differently. Will close this once the bug fix is merged.