Open MourinhoLove opened 7 years ago
Hello @MourinhoLove! This is not supported currently, and I don't plan to add this feature in nearest future, sorry.
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.
@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! 😄
@Daltron Thank you for your answer. Its help me.
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.
@keithburgoyne +1
@Daltron do you have the obj-c code for that? I need to have the image next to the text. Thanks
How Can I change disclosureIndicatorImage position When I change headheaderComponents title?