chamitha / LocationRow

MIT License
1 stars 0 forks source link

Fix how Location selector is presented. #1

Open mtnbarreto opened 5 years ago

mtnbarreto commented 5 years ago

According to calendar app, location selector is presented from bottom (not as push view controller). We can provide such configuration but the default behavior should mimic calendar app.

chamitha commented 5 years ago

@mtnbarreto, I need some assistance with this and perhaps you can direct me towards any docs or examples? The UISearchController is added to the UINavigationItem.searchController property but a modal presentation has no navigation controller as the PresentationMode uses the PresenterRow type alias that is a UIViewController. Some custom row implementations add a navigation bar to the view controller xib in Interface Builder instead of using a navigation controller. This does work for a navigation bar with a title view, left and right buttons but the searchController property of its UINavigationItem appears to be ignored. I suspect the logic to use and render the contents of this property MAY be implemented by the navigation controller. The fallback is to add a UISearchBar (instead of UISearchController) below the navigation bar in Interface Builder. However this is a last resort as it is old fashioned! The ideal (and simplest) solution would be to present the selector view controller wrapped in a UINavigationController if possible.

chamitha commented 5 years ago

@mtnbarreto, this is an approach I adopted that perhaps you can review?