iOS Question Status Bar, I need to customize color and remove bottom controls

Discussion in 'iOS Questions' started by b4xscripter, May 15, 2018.

  1. b4xscripter

    b4xscripter Member Licensed User


    I have a question related to the status bar's color. I have this code:

    'Code module
    #Region  Project Attributes 
    #ApplicationLabel: MSA2
    #Version: 0.0.4 
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
        #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    #Target: iPhone, iPad
    #ATSEnabled: True
    #MinVersion: 7
    '    #Entitlement: <key>aps-environment</key><string>production</string>
    #End Region

       #CertificateFile: ios_distribution.cer
       #ProvisionFile: store.mobileprovision
    #END IF

    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 location As Button
    End Sub

    Private Sub Application_Start (Nav As NavigationController)
        NavControl = Nav
    Dim no As NativeObject = NavControl

    "navigationBar").SetField("barTintColor", no.ColorToUIColor(Colors.ARGB(255,33,150,243)))
        Page1.TopRightButtons = 
    Array( _
    Chr(0xE0C8), "addAlert") _
    Chr(0xE8B6), "find"))
        NavControl.ToolBarVisible = 
    End Sub

    Private Sub Page1_BarButtonClick (Tag As String)
    'toolbar events
        Log(Tag & " was clicked toolbar events")
    End Sub

    Private Sub BarButton_Click
    Dim b As Button = Sender
    Log(b.Tag & " was clicked!!!!!")
    End Sub

    Private Sub CreateFABarButton(text As String, tag As Object) As BarButton
    Dim bb As BarButton
    Dim b As Button
        b.CustomLabel.Font = 
    Font.CreateNew2("Material Icons"24)
        b.Text = text
        b.Tag = tag
    Return bb
    End Sub

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

    Private Sub Application_Background
    End Sub
    Everythings works OK but I just need to change the status bar color and remove the bottom controls, as it is shown in the picture attached. Can anyone help me how to do that?
    Many thanks!

  2. Erel

    Erel Administrator Staff Member Licensed User

  3. b4xscripter

    b4xscripter Member Licensed User

    Thank you, Erel!
    For the second question, it is OK!
    For the first one...
    I read the post you've meant, I saw that it's about the code:

    Dim no As NativeObject = App
    But what I want is to have the status bar in a different color, let's suppose, yellow. How to do it?

    As in your first post, I put this as well:

    #PlistExtra: <key>UIViewControllerBasedStatusBarAppearance</key><false/>


    Thank you for your help!

    Best regards
  4. Erel

    Erel Administrator Staff Member Licensed User

    It is not possible to change the color without using private APIs that are likely to cause your app to be rejected.
  5. b4xscripter

    b4xscripter Member Licensed User

    ok, thank you, Erel!

    Best regards
  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