Closed kiwo12345 closed 8 years ago
is it a UIButton or a UIBarButtonItem?
@andreamazz UIButton :)
Right bar button -> bar button items -> UIButton
Ok, so it's inside a navigation bar. It's always tricky finding the right position for those buttons. Take a look at this SO thread
@andreamazz look like someone else was asking the same thing I will try to convert the answer into swift 3 and see if it works
@andreamazz That didnt work : / I also added a image to my btn and tried to use the image center which did not work. Do you think I could wrap the btn inside a uiview and use the center of that view? running out of ideas now
It's always tricky getting the right position in the navigation bar. You can add some hardcoded offsets, it's not pretty, but it'll get the job done.
I'm closing this issue if you don't mind, since it's not directly related to the library.
@andreamazz this worked out perfect:
transition.startingPoint = CGPoint(x: bubbleBtn.center.x, y: bubbleBtn.center.y + 20)
I am using the button inside my Navbar like:
Right bar button -> bar button items -> BubbleBtn
But when I set:
transition.startingPoint = BubbleBtn.center
it will make the transition start form the very top right corner of my screen:How can I make it start from the center of the button?