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

About disclosureIndicatorImage #17

Open
MourinhoLove opened this issue Feb 22, 2017 · 7 comments
Open

About disclosureIndicatorImage #17

MourinhoLove opened this issue Feb 22, 2017 · 7 comments

Comments

@MourinhoLove
Copy link

How Can I change disclosureIndicatorImage position When I change headheaderComponents title?

@maxkonovalov
Copy link
Owner

Hello @MourinhoLove! This is not supported currently, and I don't plan to add this feature in nearest future, sorry.

@Daltron
Copy link

Daltron commented Mar 13, 2017

I am also in favor of this as I want the arrow to be directly right after my text. My text displayed is dynamic so a predefined width won't always work.

@Daltron
Copy link

Daltron commented Mar 14, 2017

@MourinhoLove Here is what worked for me. When creating a new drop down menu with dynamic text, calculate the size of the string as follows:

let size = (title as NSString).size(attributes: customTextAttributes)
let dropdownMenu = MKDropdownMenu(frame: CGRect(x: 0, y: 0, width: size.width + 35, height: 44))

Notice I add +35 to the width. This is because I want the disclosureIndicatorImage to fit into the bounds as well. This could be slightly smaller/larger depending on the size of your indicator image.

Hope this helps! 😄

@MourinhoLove
Copy link
Author

@Daltron Thank you for your answer. Its help me.

@keithburgoyne
Copy link

keithburgoyne commented Jul 24, 2017

I would also find this very useful. I'm not sure I want to recreate the menu every time a menu item is selected. I have my menu updating the component title whenever a row is selected.

@BeQuietLee
Copy link

@keithburgoyne +1

@lorenzoPrimi
Copy link

@Daltron do you have the obj-c code for that? I need to have the image next to the text.
Thanks

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

6 participants