public override void ViewDidLoad() { base.ViewDidLoad(); placeViews = new List <PlaceView> (); coffeeAnimation = CoffeeAnimationView.GetView(this); NavigationController.NavigationBar.TintColor = tintColor; var appearance = UIBarButtonItem.AppearanceWhenContainedIn(typeof(UINavigationBar)); appearance.SetTitleTextAttributes(new UITextAttributes { TextColor = tintColor, Font = UIFont.FromName("HelveticaNeue-Light", 20f) }, UIControlState.Normal); MapView.ShowsUserLocation = true; try { viewModel = ServiceContainer.Resolve <CoffeeFilterViewModel>(); } catch { viewModel = new CoffeeFilterViewModel(); ServiceContainer.Register <CoffeeFilterViewModel>(viewModel); } var searchButton = NavigationItem.RightBarButtonItem; var navigationButton = new UIBarButtonItem(UIImage.FromBundle("near"), UIBarButtonItemStyle.Plain, OpenMaps); NavigationItem.SetRightBarButtonItems(new [] { searchButton, navigationButton }, false); RefreshData(true); }
public override void ViewDidLoad () { base.ViewDidLoad(); placeViews = new List<PlaceView> (); coffeeAnimation = CoffeeAnimationView.GetView(this); NavigationController.NavigationBar.TintColor = tintColor; var appearance = UIBarButtonItem.AppearanceWhenContainedIn(typeof(UINavigationBar)); appearance.SetTitleTextAttributes(new UITextAttributes { TextColor = tintColor, Font = UIFont.FromName("HelveticaNeue-Light", 20f) }, UIControlState.Normal); MapView.ShowsUserLocation = true; try { viewModel = ServiceContainer.Resolve<CoffeeFilterViewModel>(); } catch { viewModel = new CoffeeFilterViewModel (); ServiceContainer.Register<CoffeeFilterViewModel>(viewModel); } var searchButton = NavigationItem.RightBarButtonItem; var navigationButton = new UIBarButtonItem (UIImage.FromBundle("near"), UIBarButtonItemStyle.Plain, OpenMaps); NavigationItem.SetRightBarButtonItems(new [] { searchButton, navigationButton }, false); RefreshData(true); }