Handle root being a navigation controller
Handle root being a navigation controller

The automatic screen event code did not handle the case where the root view controller was a UINavigationController.

The code would often just report the top level Nav as it would not always have a presented VC.

This proposed change checks for a top level nav controller, and steps into either it's presented controller or it's last in the list of view controllers as appropriate.

Move into the recursive func

Refactor the navigation controller handling into the recursive function to handle (hopefully) any combination of nav/view/nav/nav/view whatnot =)

Code Style Matching

Fixed up some coding style to match the prevailing things ('*' hugging, == ordering)

patch

hzalaz/analytics-ios,string-team/analytics-ios,segmentio/analytics-ios,string-team/analytics-ios,djfink-carglass/analytics-ios,hzalaz/analytics-ios,hzalaz/analytics-ios,string-team/analytics-ios,djfink-carglass/analytics-ios,segmentio/analytics-ios,segmentio/analytics-ios,segmentio/analytics-ios,djfink-carglass/analytics-ios