Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left Alignment of Placeholder Text? #93

Open
joncursi opened this issue Sep 14, 2016 · 4 comments
Open

Left Alignment of Placeholder Text? #93

joncursi opened this issue Sep 14, 2016 · 4 comments

Comments

@joncursi
Copy link

The search icon and placeholder text are aligned center by default. Would be great if that could change to left-hand or right-hand alignment, depending on the use case. I.e. in Apple Maps, the search bar placeholder and icon is left-aligned:

img_2964

@iRoachie
Copy link
Collaborator

iRoachie commented Jan 5, 2018

Not sure what's the best way to add this functionality into our current setup. Placeholder alignment isn't supported natively for UISearchBar. In the example your posted, they're using a UITextField and handling the UISearchBarDelegate.

This is definitely something I'd like to have in the library though. Any suggestion you have would be appreciated.

@ocarreterom
Copy link

ocarreterom commented Jan 14, 2018

I think in iOS 11 the placeholder is default left aligned.

@mileung
Copy link

mileung commented Jan 8, 2019

A hack might be to just add spaces to the end of the placeholder text

@maxgfr
Copy link

maxgfr commented Mar 26, 2020

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants