public override void Scrolled(UIScrollView scrollView) { double timeLapsed = NSDate.Now.SecondsSinceReferenceDate - LastTime; if (timeLapsed > .10f && DidTick == false) { // notify our parent // guard against this callback being received after we've switched away from this task. if (NavToolbar != null) { DidTick = true; // get the percentage. If we're near the top, simply show the bar. nfloat scrollPerc = scrollView.ContentOffset.Y / scrollView.ContentSize.Height; if (scrollPerc < .10f) { NavToolbar.Reveal(true); } else { // otherwise, if we flicked quickly, let the toggle the bar nfloat scrollDelta = LastPos.Y - scrollView.ContentOffset.Y; if (scrollDelta > 75) { NavToolbar.Reveal(true); } else if (scrollDelta < -125) { NavToolbar.Reveal(false); } } } } }
public override void WillShowViewController(TaskUIViewController viewController) { base.WillShowViewController(viewController); // if it's the main page, disable the back button on the toolbar if (viewController == MainPage) { NavToolbar.SetShareButtonEnabled(false, null); NavToolbar.SetCreateButtonEnabled(true, null); NavToolbar.Reveal(true); } else { NavToolbar.SetShareButtonEnabled(false, null); NavToolbar.SetCreateButtonEnabled(false, null); // if we're showing the post controller, don't reveal the nav bar, // as nothing should be allowed while posting. if (viewController as Prayer_PostUIViewController == null) { //NavToolbar.RevealForTime( 3.0f ); NavToolbar.Reveal(true); } } }
public override void WillShowViewController(TaskUIViewController viewController) { base.WillShowViewController(viewController); // turn off the share & create buttons NavToolbar.SetShareButtonEnabled(false, null); NavToolbar.SetCreateButtonEnabled(false, null); // if it's the main page, nide the nav toolbar if (viewController == MainPageVC) { NavToolbar.Reveal(false); } // if it's the group finder, force the nav toolbar to always show else if (viewController as GroupFinderViewController != null) { NavToolbar.Reveal(true); } // otherwise, as long as it IS NOT the webView, do the standard 3 seconds else if (viewController as TaskWebViewController == null) { //NavToolbar.RevealForTime( 3.0f ); NavToolbar.Reveal(true); } }
public override void WillShowViewController(TaskUIViewController viewController) { base.WillShowViewController(viewController); // if we're coming from WebView or Notes and going to something else, // force the device back to portrait // if the notes are active, make sure the share button gets turned on if ((viewController as NotesViewController) != null) { // Let the view controller manage this being enabled, because // it's conditional on being in landscape or not. NavToolbar.SetCreateButtonEnabled(false, null); NavToolbar.SetShareButtonEnabled(true, delegate { (viewController as NotesViewController).ShareNotes( ); }); // go ahead and show the bar, because we're at the top of the page. NavToolbar.Reveal(true); } else if ((viewController as NotesWatchUIViewController) != null) { // Let the view controller manage this being enabled, because // it's conditional on being in landscape or not. NavToolbar.SetCreateButtonEnabled(false, null); NavToolbar.SetShareButtonEnabled(true, delegate { (viewController as NotesWatchUIViewController).ShareVideo( ); }); } else if ((viewController as NotesDetailsUIViewController) != null) { NavToolbar.SetCreateButtonEnabled(false, null); NavToolbar.SetShareButtonEnabled(false, null); //NavToolbar.RevealForTime( 3.0f ); NavToolbar.Reveal(true); } else if ((viewController as NotesMainUIViewController) != null) { NavToolbar.SetCreateButtonEnabled(false, null); NavToolbar.SetShareButtonEnabled(false, null); NavToolbar.Reveal(false); } else if ((viewController as TaskWebViewController) != null) { NavToolbar.SetCreateButtonEnabled(false, null); NavToolbar.SetShareButtonEnabled(false, null); } else if ((viewController as BiblePassageViewController) != null) { NavToolbar.SetCreateButtonEnabled(false, null); NavToolbar.SetShareButtonEnabled(false, null); } }
public override void WillShowViewController(TaskUIViewController viewController) { base.WillShowViewController(viewController); // turn off the back, share & create buttons NavToolbar.SetBackButtonEnabled(false); NavToolbar.SetShareButtonEnabled(false, null); NavToolbar.SetCreateButtonEnabled(false, null); NavToolbar.Reveal(true); }
public override void WillShowViewController(TaskUIViewController viewController) { base.WillShowViewController(viewController); // turn off the share & create buttons NavToolbar.SetShareButtonEnabled(false, null); NavToolbar.SetCreateButtonEnabled(false, null); // if it's the main page, disable the back button on the toolbar if (viewController == MainPageVC) { NavToolbar.Reveal(false); } else if (viewController as TaskWebViewController == null) { NavToolbar.Reveal(true); } }
public override void TouchesEnded(TaskUIViewController taskUIViewController, NSSet touches, UIEvent evt) { base.TouchesEnded(taskUIViewController, touches, evt); // immediately hide the toolbar on the main page if (ActiveViewController == MainViewController) { NavToolbar.Reveal(false); } // allow it as long as it's the watch window in portrait mode or landscape wide mode. else if ((ActiveViewController as NotesWatchUIViewController) != null) { if (SpringboardViewController.IsLandscapeWide( ) || SpringboardViewController.IsDevicePortrait( )) { //NavToolbar.RevealForTime( 3.0f ); } } }