iOS Question How do I add a button to logout and shut down my app?

Discussion in 'iOS Questions' started by davepamn, Mar 19, 2015.

  1. davepamn

    davepamn Active Member Licensed User

    I need a way to shut down my app from a menu with the press of a button
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. davepamn

    davepamn Active Member Licensed User

    Should I go to a blank page when the user clicks "Done"
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    It is up to you. However Apple doesn't allow you to quit your app.
     
  5. davepamn

    davepamn Active Member Licensed User

    There is a "Done" Button that can be added to B4i. Do I need to intercept an delegate function and handle redirection to a finish page?
    Code:
    Dim b1 As BarButton
    b1.InitializeSystem(b1.ITEM_DONE, 
    "b1")
    Page2.TopLeftButtons = 
    Array(b1)
    What function does the Item_Done button perform?
     
  6. Brian Robinson

    Brian Robinson Active Member Licensed User

    What about just load a different Layout?

    Cheers
    Brian
     
  7. davepamn

    davepamn Active Member Licensed User

    Here is my solution for logout
    Code:
    Sub Process_Globals
    Private BlankPage As Page
    end sub

        BlankPage.Initialize(
    "BlankPage")
        BlankPage.Title=
    "Logout"
        BlankPage.RootPanel.LoadLayout(
    "frmBlankPage")

    Dim b1 As BarButton

        b1.InitializeText(
    "Logout","NavButton1")
        Page2.TopLeftButtons.Clear
        Page2.TopLeftButtons=
    Array(b1)
        
    'Custom
        OpenAutoLoginFile


    Sub Page2_BarButtonClick(Tag As String)

        
    If Tag="NavButton1" Then
            
    'Custom
            ResetLoginFile 
            BlankPage.HideBackButton=
    True
            NavControl.ShowPage(BlankPage)

        
    End If

    End Sub
     
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