public override void ViewDidLoad() { base.ViewDidLoad(); // MainNavigationController must have a black background so that the ticks // before the task displays don't cause a flash View.BackgroundColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BackgroundColor); View.Layer.AnchorPoint = CGPoint.Empty; View.Layer.Position = CGPoint.Empty; DarkPanel = new UIView(); DarkPanel.Layer.AnchorPoint = CGPoint.Empty; DarkPanel.Frame = View.Frame; DarkPanel.Layer.Opacity = 0.0f; DarkPanel.BackgroundColor = UIColor.Black; View.AddSubview(DarkPanel); // setup the style of the nav bar NavigationBar.TintColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.TextField_PlaceholderTextColor); UIImage solidColor = new UIImage(); UIGraphics.BeginImageContext(new CGSize(1, 1)); CGContext context = UIGraphics.GetCurrentContext( ); context.SetFillColor(Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.TopNavToolbar_BackgroundColor).CGColor); context.FillRect(new CGRect(0, 0, 1, 1)); solidColor = UIGraphics.GetImageFromCurrentImageContext( ); UIGraphics.EndImageContext( ); NavigationBar.BarTintColor = UIColor.Clear; NavigationBar.SetBackgroundImage(solidColor, UIBarMetrics.Default); NavigationBar.Translucent = false; // our first (and only) child IS a ContainerViewController. Container = new ContainerViewController( ); PushViewController(Container, false); // setup a shadow that provides depth when this panel is slid "out" from the springboard. ApplyEdgeShadow( ); // setup our pan gesture PanGesture = new UIPanGestureRecognizer(OnPanGesture); PanGesture.MinimumNumberOfTouches = 1; PanGesture.MaximumNumberOfTouches = 1; View.AddGestureRecognizer(PanGesture); }
public override void ViewDidLoad() { base.ViewDidLoad(); // MainNavigationController must have a black background so that the ticks // before the task displays don't cause a flash View.BackgroundColor = Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BackgroundColor ); View.Layer.AnchorPoint = CGPoint.Empty; View.Layer.Position = CGPoint.Empty; DarkPanel = new UIView(); DarkPanel.Layer.AnchorPoint = CGPoint.Empty; DarkPanel.Frame = View.Frame; DarkPanel.Layer.Opacity = 0.0f; DarkPanel.BackgroundColor = UIColor.Black; View.AddSubview( DarkPanel ); // setup the style of the nav bar NavigationBar.TintColor = Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_PlaceholderTextColor ); UIImage solidColor = new UIImage(); UIGraphics.BeginImageContext( new CGSize( 1, 1 ) ); CGContext context = UIGraphics.GetCurrentContext( ); context.SetFillColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TopNavToolbar_BackgroundColor ).CGColor ); context.FillRect( new CGRect( 0, 0, 1, 1 ) ); solidColor = UIGraphics.GetImageFromCurrentImageContext( ); UIGraphics.EndImageContext( ); NavigationBar.BarTintColor = UIColor.Clear; NavigationBar.SetBackgroundImage( solidColor, UIBarMetrics.Default ); NavigationBar.Translucent = false; // our first (and only) child IS a ContainerViewController. Container = new ContainerViewController( ); PushViewController( Container, false ); // setup a shadow that provides depth when this panel is slid "out" from the springboard. ApplyEdgeShadow( ); // setup our pan gesture PanGesture = new UIPanGestureRecognizer( OnPanGesture ); PanGesture.MinimumNumberOfTouches = 1; PanGesture.MaximumNumberOfTouches = 1; View.AddGestureRecognizer( PanGesture ); }