iOS Question Adding Views to NavigationBar

Discussion in 'iOS Questions' started by narek adonts, Feb 15, 2015.

  1. narek adonts

    narek adonts Well-Known Member Licensed User

    Hi,

    Could you advise the way to add Views (Searchbox, Segmented Control, Image instead of page title,...) to the Navigation Bar.
    I think this is a thing that a lot of apps are doing.
    Or the way to create your own Navigation Bar,

    thank you

    Narek
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can add custom views with BarButton.InitializeCustom.
    For example the following code adds a TextField:
    Code:
    Private Sub Application_Start (Nav As NavigationController)
       NavControl = Nav
       Page1.Initialize(
    "Page1")
       Page1.Title = 
    "Page 1"
       Page1.RootPanel.Color = 
    Colors.White
       NavControl.ShowPage(Page1)
       
    Dim bb As BarButton
       
    Dim tf As TextField
       tf.Initialize(
    "tf")
       tf.HintText = 
    "Enter something"
       tf.SetLayoutAnimated(
    010010030)
       bb.InitializeCustom(tf)
       Page1.TopRightButtons = 
    Array(bb)
    End Sub
    You can always remove the navigation bar and add a regular panel instead.
     
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