Пример #1
0
 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();
     }
 }