public void ShowAll(bool animate = true) { if (animate) { UIView.BeginAnimations("FunkyTabReset"); UIView.SetAnimationDuration(0.5f); } foreach (UIViewController c in ViewControllers) { ENoteView ttv = tabs[c]; ttv.Frame = tabViewStart[ttv]; ttv.Alpha = 1.0f; c.View.Frame = viewControllerStart[c]; c.View.Alpha = 1.0f; } if (OnShowAll != null) { OnShowAll(this, EventArgs.Empty); } if (animate) { UIView.CommitAnimations(); } IsShowingSingle = false; }
void SetupTabs() { float currentYPos = TabStartY; float currentWidth = StartingWidth - (ViewControllers.Count * TabWidthDelta); foreach (UIViewController c in ViewControllers) { // Add the view in ENoteView ttv = new ENoteView(this, c); ttv.Frame = new RectangleF((320f - currentWidth) / 2, currentYPos, currentWidth, TabHeight); c.View.Frame = new RectangleF((320f - currentWidth) / 2, currentYPos, currentWidth, View.Frame.Height); currentYPos += 28; currentWidth += TabWidthDelta; Add(c.View); Add(ttv); viewControllerStart[c] = c.View.Frame; tabViewStart[ttv] = ttv.Frame; tabs[c] = ttv; } }