public void SetContent() { if (Parent != null) { nint tag = 0; Parent.ViewControllers.ForEach(x => { var button = new SimpleButton { Text = x.Title, Tag = tag++, Tapped = (b) => { var s = b.Superview as CustomScroller; var p = s.Superview as PanaramaView; p.ScrollTo((int)b.Tag); } }; if (Parent.SelectedTitleFont != null) { button.Font = Parent.SelectedTitleFont; } if (Parent.TitleColor != null) { button.TitleColor = Parent.TitleColor; } button.SizeToFit(); Buttons.Add(button); Views.Add(x.View); scroller.Add(button); scroller.Add(x.View); Parent.AddChildViewController(x); SetScrollToTop(x as UITableViewController); }); scroller.Add(HeaderBackground); SetScrollContent(); if (Parent.ViewControllers.Length > 0) { spinner.RemoveFromSuperview(); spinner = null; } UpdateButtons(); } }
public IntroView() { BackgroundColor = UIColor.FromPatternImage(UIImage.FromBundle("launchBg")); Add(blurView = new BluredView(UIBlurEffectStyle.Light)); Add(image = new UIImageView(UIImage.FromBundle("headphones"))); if (!Device.IsIos8) { blurView.Alpha = 0; image.Alpha = 0; } Add(headerText = new UITextView { Text = Strings.WelcomToGmusic, TextAlignment = UITextAlignment.Center, TextColor = UIColor.White, Font = Style.DefaultStyle.HeaderTextThinFont, BackgroundColor = UIColor.Clear, }); //Add(textView = new UITextView { // Text = Text, // TextAlignment = UITextAlignment.Center, // TextColor = UIColor.White, // BackgroundColor = UIColor.Clear, //}); Add(login = new SimpleButton { Text = Strings.Login, }.StyleAsBorderedButton()); login.SizeToFit(); //Add(signinLater = new SimpleButton //{ // Text = "Login", // Tapped = Cancel, //}); }