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

Flags show up in different sizes when selected for the phone number text field #131

Open
timmyvc123 opened this issue Sep 8, 2020 · 4 comments

Comments

@timmyvc123
Copy link

Some flags are normal size and look nice but most show up as super small or a little bit small.

@Vivek205
Copy link

image

I'm also facing the same issue.

@timmyvc123 , did you find any solution for this issue?

@timmyvc123
Copy link
Author

@Vivek205 no sorry I never figured it out. Please let me know if you do

@jab11
Copy link

jab11 commented Apr 10, 2022

since this is unresolved, in case anybody's wondering...
specifying the view frame when you construct it means it will fit the text next to the image, and if it's too long it will the flagImageView will shrink, at least in my testing
I don't know how to make it autosize or make the flagImageView size fixed

@Dilmurat99
Copy link

It looks much better after I put into UIStackView as follow:

    let cpv = CountryPickerView()
    let spaceView = UIView()
    spaceView.widthAnchor.constraint(equalToConstant: 5).isActive = true
    spaceView.heightAnchor.constraint(equalToConstant: 30).isActive = true
    cpv.widthAnchor.constraint(equalToConstant: 90).isActive = true
    cpv.heightAnchor.constraint(equalToConstant: 30).isActive = true
    let stackView = UIStackView()
    stackView.axis = .horizontal
    stackView.alignment = .fill
    stackView.distribution = .fill
    stackView.addArrangedSubview(spaceView)
    stackView.addArrangedSubview(cpv)
    cpv.showCountryCodeInView = false

and put stackView as a left view into UITextField.

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

No branches or pull requests

4 participants