iOS Question Page over TabBar

Discussion in 'iOS Questions' started by narek adonts, Feb 22, 2015.

  1. narek adonts

    narek adonts Well-Known Member Licensed User

    hi again,

    Is it possible to show a page over a TabBar(which covers the TabBar)?

    Narek
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can temporary remove the tab bar controller and set a NavigationController (without bars).
     
  3. narek adonts

    narek adonts Well-Known Member Licensed User

    Yes but in this case the NavigationController which I was using for a page will not function, so no back button,...
    And they will be no animation when showing the page with the new NavControl. So it is not the best solution. It is dirty.

    Narek
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can show a dialog page with this code:
    Code:
    Sub Process_Globals
       
    Public App As Application
       
    Public NavControl As NavigationController
       
    Private Page1 As Page
       
    Private DialogPage As Page
    End Sub

    Private Sub Application_Start (Nav As NavigationController)
       NavControl = Nav
       Page1.Initialize(
    "Page1")
       Page1.RootPanel.Color = 
    Colors.Green
       NavControl.ShowPage(Page1)
       DialogPage.Initialize(
    "DialogPage")
       DialogPage.RootPanel.Color = 
    Colors.Red
    End Sub

    Sub Page1_Click
       PresentPage(Page1, DialogPage)
    End Sub

    Sub DialogPage_Click
       DismissPage(Page1)
    End Sub

    Sub PresentPage(Parent As Page, dialog As Page)
       
    Dim no As NativeObject = Parent
       no.RunMethod(
    "presentViewController:animated:completion:"Array(dialog, TrueNull))
    End Sub
    Sub DismissPage(Parent As Page)
       
    Dim no As NativeObject = Parent
       no.RunMethod(
    "dismissViewControllerAnimated:completion:"Array(TrueNull))
    End Sub
     
  5. narek adonts

    narek adonts Well-Known Member Licensed User

    why this code is not working?

    Code:
    Sub PresentPage(Parent As Page, dialog As Page)
       
    Dim no As NativeObject = Parent
      no.SetField(
    "ModalTransitionStyle","UIModalTransitionStyleFlipHorizontal")
      no.RunMethod(
    "presentModalViewController:animated:"Array(dialog, True))


    End Sub
    The view is shown but I am not able to change the transition style.

    Narek
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Do you get an error? If yes then you need to post it.

    1. You need to set the property of dialog not parent.
    2. Replace "UIModalTransitionStyleFlipHorizontal" with the constant value which is 1.
     
  7. ilan

    ilan Expert Licensed User

    i know its an old thread but maybe someone is interested :)

    Code:
    Sub PresentPage2(Parent As Page, dialog As Page)
      
    Dim no As NativeObject = dialog
      no.SetField(
    "modalTransitionStyle",1)

      
    Dim no2 As NativeObject = Parent
      no2.RunMethod(
    "presentModalViewController:animated:"Array(dialog, True))
    End Sub
    flip.gif
     
  8. ilan

    ilan Expert Licensed User

    ps. if you change the transition value to 3 you will get a nice Book PageFlip animation ;)

    book.gif
     
    JordiCP and Erel like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice