public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // create a new window instance based on the screen size Window = new UIWindow(UIScreen.MainScreen.Bounds); // If you have defined a root view controller, set it here: // Window.RootViewController = myViewController; Stripe.StripeClient.DefaultPublishableKey = AppConstants.StripeAPIKey; MapServices.ProvideAPIKey("AIzaSyAiBwRUm_KZDv_sp3eI7F8hxkePqDTvY20"); presenter = IsPad ? (IMvxTouchViewPresenter) new PadPresenter(this, Window) : (IMvxTouchViewPresenter) new PhonePresenter(this, Window); var setup = new Setup(this, presenter); setup.Initialize(); //get last used language var language = NSUserDefaults.StandardUserDefaults.StringForKey(AppConstants.Language); if (string.IsNullOrEmpty(language)) { Mvx.Resolve <IMvxTextProviderBuilder>().LoadResources(string.Empty); } else { Mvx.Resolve <IMvxTextProviderBuilder>().LoadResources(language); } var startup = Mvx.Resolve <IMvxAppStart>(); startup.Start(); // make the window visible Window.MakeKeyAndVisible(); //customize navigation bar UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(35, 137, 203); UINavigationBar.Appearance.TintColor = UIColor.White; UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes(new NSDictionary(UIStringAttributeKey.ForegroundColor, UIColor.White)); UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false); //customize tab bar var textAttributes = new UITextAttributes(); textAttributes.Font = UIFont.FromName("HelveticaNeue-Bold", 17f); textAttributes.Font = FontHelper.AdjustFontSize(textAttributes.Font); UITabBarItem.Appearance.SetTitleTextAttributes(textAttributes, UIControlState.Normal); //initialize Crittercism #if DEBUG #else Crittercism.Init("55fcbf338d4d8c0a00d07a12"); #endif return(true); }
private void AdjustFont() { lbAddress.Font = FontHelper.AdjustFontSize(lbAddress.Font); lbEndTime.Font = FontHelper.AdjustFontSize(lbEndTime.Font); lbNumberVehicle.Font = FontHelper.AdjustFontSize(lbNumberVehicle.Font); lbTypeVehicle.Font = FontHelper.AdjustFontSize(lbTypeVehicle.Font); }
public void AdjustFontSize(UIView view) { foreach (var subview in view.Subviews) { if (subview.Subviews != null && subview.Subviews.Length != 0) { AdjustFontSize(subview); } else { if (subview is UIButton) { (subview as UIButton).Font = FontHelper.AdjustFontSize((subview as UIButton).Font); } else if (subview is UILabel) { (subview as UILabel).Font = FontHelper.AdjustFontSize((subview as UILabel).Font); } } } }
public void AdjustFontSize() { lbPrice.Font = FontHelper.AdjustFontSize(lbPrice.Font); lbHour.Font = FontHelper.AdjustFontSize(lbHour.Font); lbTime.Font = FontHelper.AdjustFontSize(lbTime.Font); }