public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { planVC = new PlanViewController(); myPlansVC = new MyPlansViewController(); navCon = new UINavigationController(myPlansVC); navCon.NavigationBar.BarTintColor = Util.Green; navCon.NavigationBar.TintColor = UIColor.White; navCon.NavigationBar.TitleTextAttributes = new UIStringAttributes() { ForegroundColor = UIColor.White, Font = UIFont.FromName(Util.FontMain, 20) }; // navCon.NavigationBar.titlet // Override point for customization after application launch. // If not required for your application you can safely delete this method Util.navController = navCon; Window = new UIWindow(UIScreen.MainScreen.Bounds); Window.RootViewController = navCon; Window.MakeKeyAndVisible(); return(true); }
public MyPlansTableCell(List <PlanModel> _myPlans, float _cellHt, int _index, MyPlansViewController _myVC) : base(UITableViewCellStyle.Value1, Key) { myPlans = _myPlans; cellHt = _cellHt; index = _index; myVC = _myVC; planImg = new UIImageView() { ContentMode = UIViewContentMode.ScaleAspectFill, BackgroundColor = UIColor.Clear }; name = new UILabel() { TextColor = UIColor.White, Font = UIFont.FromName(Util.FontMain, 22), BackgroundColor = UIColor.Clear, TextAlignment = UITextAlignment.Center }; UITapGestureRecognizer tap = new UITapGestureRecognizer(); tap.AddTarget(() => { OnSelect(index); }); diff = new UIButton() { BackgroundColor = Util.Green, Font = UIFont.FromName("AvenirNextLTPro-Bold", 14) }; diff.SetTitleColor(UIColor.White, UIControlState.Normal); diff.Layer.CornerRadius = 18; diff.ClipsToBounds = true; daysLeft = new UILabel() { BackgroundColor = UIColor.Clear, Font = UIFont.FromName(Util.FontMain, 12), TextColor = UIColor.White, TextAlignment = UITextAlignment.Left }; wType = new UIButton() { BackgroundColor = Util.Green, Font = UIFont.FromName("AvenirNextLTPro-Bold", 14) }; wType.SetTitleColor(UIColor.White, UIControlState.Normal); wType.Layer.CornerRadius = 18; wType.ClipsToBounds = true; wType.UserInteractionEnabled = false; diff.UserInteractionEnabled = false; planImg.UserInteractionEnabled = true; planImg.AddGestureRecognizer(tap); clock = new UIImageView(UIImage.FromFile("Images/clockgreen.png").ImageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)) { ContentMode = UIViewContentMode.ScaleAspectFit, TintColor = UIColor.White }; g = new CAGradientLayer() { NeedsDisplayOnBoundsChange = true, MasksToBounds = true, Colors = new CGColor[] { UIColor.Clear.CGColor, UIColor.FromRGBA(0, 0, 0, 0.5f).CGColor } }; ContentView.BackgroundColor = UIColor.Clear; ContentView.Add(planImg); ContentView.Layer.InsertSublayer(g, 1); ContentView.Add(name); ContentView.Add(diff); ContentView.Add(wType); ContentView.Add(daysLeft); ContentView.Add(clock); }
public MyPlansTableSource(List <PlanModel> _myPlans, string _id, MyPlansViewController _myVC) { myPlans = _myPlans; id = _id; myVC = _myVC; }