iOS Question Cannot see my actionsheet

rfresh

Well-Known Member
Licensed User
Longtime User
I'm not sure why I cannot see my actionsheet?

Thank you...

B4X:
'Code module
#Region  Project Attributes 
    #ApplicationLabel: ATCNotes
    #Version: 1.0.0 
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait
    #iPadOrientations: Portrait
    #Target: iPhone, iPad
    #ATSEnabled: True
    #MinVersion: 7
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page

    Private pScreenHeight = 0 As Int
    Private pScreenWidth = 0 As Int

    Private penColorSheet As ActionSheet

End Sub

Private Sub Application_Start (Nav As NavigationController)
    'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "ATCNotes"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)

    pScreenHeight = GetDeviceLayoutValues.Height
    pScreenWidth = GetDeviceLayoutValues.Width

    penColorSheet.Initialize("clickPenColorSheet", "", "", "", Array As String("1111", "2222", "3333", "4444"))
    penColorSheet.Show(Page1.RootPanel)
   
End Sub

Private Sub clickPenColorSheet_Click(Item As String)
    Dim value As Int
    Select Item
        Case "1111"
            value = 1
        Case "2222"
            value = 2
        Case "333"
            value = 3
        Case "4444"
            value = 4
    End Select
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
   
End Sub

Private Sub Application_Background
   
End Sub
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
 pScreenHeight = GetDeviceLayoutValues.Height
    pScreenWidth = GetDeviceLayoutValues.Width
Not sure what you are doing with these variables however you shouldn't build your layout based on these values.

I do see the action sheet when I run your code. Try to add Sleep(100) before you show it as it happens while the page is becoming visible.
 
Upvote 0
Top