Other controls than ToolButtons in NavigationBar

  1. 4 weeks ago

    Martin T

    Jan 25 Pre-Release Testers Germany

    Hi,

    if you take a look to iOS Preferences, you’ll see there is a Searchfield under the NavigationBar Title. As far as I can tell, it is only possible with Xojo to place ToolButtons within the NavigationBar. Is there a Declare to place an iOSTextField below the NavigationBar title?
    -image-

  2. Greg O

    Jan 25 Xojo Inc

    This can actually be accomplished by just making it the first row of the table. You’ll just need to set the initial offset of the table so that the second row is at the top.

  3. Martin T

    Jan 25 Pre-Release Testers Germany

    Could you please go into more detail? What’s with the line between NavigationBar and the iOSTable you suggested?

  4. Greg O

    Jan 25 Xojo Inc

    I believe it’s just a section header.

    Off the top of my head because it’s 6am here...

    First of all, if you’re filtering the data in the iOS table, this will be easier if you use a data source as you can change the contents on-the-fly. Basically, you’ll want to have the data source return n+1 sections, in which section 0 returns an empty title, and row 0 of section 0 returns a cell containing the search field. You’ll probably want to hold an instance of that cell in a property so if the table scrolls you don’t lose the users entry.

  5. Greg O

    Jan 25 Xojo Inc

    Doing a little research on Apple's website, there’s actually a special view controller for searches. From what I’m reading, iOS 10 and below used a technique similar to what I described above, albeit putting the controller in the header to the table. In iOS 11 and above, the search controller is something that you specify in the navigation controller for the view.

    What I don’t know off the top of my head is whether or not you can do this with declares. Here’s the relevant discussion on Apple’s site:

    https://developer.apple.com/documentation/uikit/view_controllers/displaying_searchable_content_by_using_a_search_controller?language=objc

  6. Jeremie L

    Jan 25 Pre-Release Testers, Xojo Pro, XDC Speakers Europe (France) - getpackr.io

    I'm currently working on implementing a search bar in the navigation controller.

    I will post an example project when it is ready.

  7. Antonio R

    Jan 28 Pre-Release Testers, Xojo Pro Europe (Italy)

    Or you can try my iOSTableViewExtended

or Sign Up to reply!