iOS Question Methods for Navigation Bar Button

gmoriwaki

Member
Licensed User
I added a button of type text on the Navigation Bar in the designer called Edit. What methods are available if I pressed the Edit text?

1.png
 

Semen Matusovskiy

Well-Known Member
Licensed User
I can understand, if you ask about event (Sub Page1_BarButtonClick (Tag As String))
But what do you name by 'methods' and when - in designer or in run-time ?
 
Upvote 0

gmoriwaki

Member
Licensed User
Sorry Semen, that is exactly what I meant. The Sub Page1_BarButtonClick (Tag as String) is what I was using, but I am using B4XPages. I created a sample test program of the following:

B4X:
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region

'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip

Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
End Sub

Public Sub Initialize
    
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
End Sub

'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.

Sub Button1_Click
    xui.MsgboxAsync("Hello world!", "B4X")
End Sub

Sub MainPage_BarButtonClick (Tag As String)
    Log(Tag)
End Sub

When I run the program and try to click the button on the top right, the event is not raised. I am not sure the event name is correct.

Any help will be appreciated.

Thanks
 
Upvote 0
Top