Cannot click on UIButtons after animation in Swift - ios

I am implementing a simple "Gear Menu" animation in a project.
When the user presses the Gear Button, it animates and shows two options ( location and rating ). My problem is that I am able to click on the Gear Button, but cannot click on the Location Button or the Rating Button.
When I click on the Gear Button, the animation starts and the animation should reverse when user clicks on Location or Rating Buttons.
Note: The animation code is generated by a tool called “CoreAnimator”. It is a very famous tool.
I have tried the following things:
Set the clipsToBounds property for the superview ( scaling ) to “True” to make sure that the Location Button and Rating Button are not going out of bounds.
Send the GearView to back in the subviews array of ( scaling ).
Still I am not able to click on the Location Button and Rating Button
Image of the Screen showing Gear Menu
Please find my project on dropbox:
https://www.dropbox.com/s/m6nshfzj8h7rux5/AnimTry.zip?dl=0

Related

How to delete a polygon on map

I implemented a map using apple's native f/w and I have implemented the functionality to add some polygons over the map. Now, I want to have a "close" button at the edge of the each polygon and when I click on that button, i need to delete the polygon (one polygon at a time). I have tried creating a button over the polygon edge, but I was unable to make an action on clicking the button. I have tried with annotations as well. In this case, I am unable create a close button over all the polygons; I could able to have the close button (annotation) only on the last polygon which was created but when I click on the button, the polygon which was created first only was getting deleted.
Kindly suggest me a solution to have a close button on each polygon, and to delete a polygon(one by one) on clicking the button.

UIButton close to keyboard does not receive touch event

You can test by yourself by cloning this repo https://github.com/sey/ios-keyboard-test.
The problem is the following:
When you enter text in a UITextField and you want to quickly tap a button which position is close to the keyboard the button does not receive touch event at first. You need to wait a small amount of time before tapping on the button does anything.
In the linked project the button action is set to clear the text field. If you enter text and touch the button quickly you will see that the text field does not get cleared and you'll have to touch the button again. If you tap on the button that is on top of the text field (not close to the keyboard) everything work as expected.
I suspect this is a bug from Apple. And I suspect this comes from the fact that some keys on the keyboard show other keys when you long press them (such as E, U). And maybe a hidden frame prevents from touching the button immediately after entering text.
My questions are:
Can you reproduce the bug? And do you know if this has already been
reported with a workaround or else?
[EDIT] Please test in landscape mode.

How to hide a view with center open - like a photoframe

In an application, in settings menu i have few 'controls' with slider bars, with each item having a small help button.
if user clicks the 'help' button, only the selected 'control' should be visible, and the remaining area should be covered with a new image (this would contain control related information), like a 'photo frame'.
Can somebody suggest, how to implement this 'photo-frame' masking in iOS?

Different Images for Button Onclick on iOS?

I have a lot of buttons in my ViewController. I would like to have a new image show when the user has his finger on the button and the default image show once he takes his finger off the button.
Is this possible ?
Thank You !
When you edit the nib, select the button, and in the right-hand utility pane, there should be a State Config drop down menu. Select Highlighted and then set the image for that state.

Why doesn't clicking on my TToolButton show the DropdownMenu?

I'm using Delphi 2010 and I have a TToolButton contained by a TToolBar. Assigned to the 'DropdownMenu' property of my TToolButton is a standard TPopupMenu.
The only way I can get the menu to appear is to click on the area pointed to by the red arrow in the image. Currently, clicking the area pointed to by the green arrow shows the button as pressed, but the dropdown menu does not appear.
What I want is if the user clicks anywhere (pointed to by green arrow or red arrow) for the menu to appear. Is it possible to enable this functionality?
The idea of the tbsDropDown style is to have a button that triggers some default action when clicked, but provides more variations of that action in the drop down menu.
If you don't care about the down arrow disappearing, you can set the style to tbsButton and no matter where the button is clicked, it will show the popup menu.
If you are like me and you do want to have the arrow there to indicate that there are more options behind this button, you can call CheckMenuDropdown in the button's OnClicked event handler.
Set Style to tbsButton. Then you can click anywhere to show the drop-down menu, but you will lose the arrow.

Resources