Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25310] iOS 11: Add the ability to change the Search Bar Size

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionNot Our Bug
Resolution Date2018-02-13T09:08:19.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sn/a
ComponentsiOS
Labelsios11, searchBar
ReporterMatthew Delmarter
AssigneeUnknown
Created2017-09-16T21:08:04.000+0000
Updated2018-08-06T17:52:05.000+0000

Description

I notice that when building with Xcode 9 / iOS 11, the SearchBar is significantly larger. Is there a way we can control this? Or get it to retain the size it was in iOS 10? I am not sure if this is what is meant to happen as part of iOS 11 and we are given no choice. Or if it is something that we can actually control somehow. Attached is a screenshot showing the difference. Same code using the 6.2.0 SDK. The left size is built using Xcode 8.3.3 and iOS 10.3. The right side is build using Xcode 9 and iOS 11. Notice that not just the height has changed but also the position of the search icon and hint text as well. It is the height that concerns me the most as it is a lot of vertical space being used now. From a comment on StackOverflow it seems you may be able to control the height. Is this something we can do in Ti? https://stackoverflow.com/questions/46037928/ios-11-uisearchbar-in-navigation-bar Overall just wanted to share the observation and see what options we have.

Attachments

FileDateSize
iOS 11 Search Bar Size.png2017-09-16T21:40:19.000+0000180201

Comments

  1. Matthew Delmarter 2017-09-16

    I updated the screenshot so you can better see the difference. I overlaid the 2 screenshots to make sure they were the exact same scale before I put them side-by-side.
  2. Hans Knöchel 2017-09-16

    It's actually the native behavior. If you look at other (system) apps, you can notice the same. I would not like to change that native behavior for now. *EDIT*: Moved it to TIMOB for future implementation.
  3. Hans Knöchel 2018-02-13

    Resolving this ticket, with some additional notes: - The Ti.UI.SearchBar received a huge refactoring between 6.3.0 and 7.0.2 and now uses the recommended API's by Apple - The extended height of the SearchBar in general is an iOS 11 UI-change that we adapted as well - Controlling the height manually is not possible with private API's and hasn't changed between iOS 10 and iOS 11 If there are more questions, let us know!
  4. Eric Merriman 2018-08-06

    Closing as "not our bug". If you disagree, please reopen.

JSON Source