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

davepamn

Active Member
Licensed User
Longtime User
I need a way to shut down my app from a menu with the press of a button
 

davepamn

Active Member
Licensed User
Longtime 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?
B4X:
Dim b1 As BarButton
b1.InitializeSystem(b1.ITEM_DONE, "b1")
Page2.TopLeftButtons = Array(b1)

What function does the Item_Done button perform?
 
Upvote 0

davepamn

Active Member
Licensed User
Longtime User
Here is my solution for logout
B4X:
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
 
Upvote 0
Top