In my application, I have buttons that are moving across the screen, and the objective is to press the buttons as quickly as possible. The animation moves the buttons, but you cannot press the button until the button is in the final position of the animation. Any suggestions/fixes on how to make the button respond to touches while in motion?
Maybe there is an enable or something I am missing?
In my application, I have buttons that are moving across the screen, and the objective is to press the buttons as quickly as possible. The animation moves the buttons, but you cannot press the button until the button is in the final position of the animation. Any suggestions/fixes on how to make the button respond to touches while in motion?
Maybe there is an enable or something I am missing?
hello.
were you able to figure this out? I'm having the same problem...
---
pretty awful code. but this is the only way i was able to make the textfield move and enabled at the same time...
any other suggestions would be very appreciated..
---
pretty awful code. but this is the only way i was able to make the textfield move and enabled at the same time...
any other suggestions would be very appreciated..
I've seen worse.
I'd recommend trying using the Apple endorsed method animateWithDuration:delayptions:animations:compl etion: rather than the depreciated methods. If you specify UIViewAnimationOptionAllowUserInteraction in the options you should be able to click it.
pretty awful code. but this is the only way i was able to make the textfield move and enabled at the same time...
any other suggestions would be very appreciated..
The system turns off user interaction on objects while they are being animated. You can ask it not to do that if you use block-style animation, ( with the method animateWithDuration:delayptions:animations:compl etion: ) as the other poster suggests:
The key is the options parameter UIViewAnimationOptionAllowUserInteraction. That tells the system to let the user interact with the object during animation.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
I'd recommend trying using the Apple endorsed method animateWithDuration:delayptions:animations:compl etion: rather than the depreciated methods. If you specify UIViewAnimationOptionAllowUserInteraction in the options you should be able to click it.
The beginAnimations...commitAnimations animation style isn't deprecated, but it is discouraged, whatever that means. Here is the relevant quote from the docs.
Code:
beginAnimations:context:
Marks the beginning of a begin/commit animation block.
Use of this method is discouraged in iOS 4.0 and later. You should use the block-based animation methods to specify your animations instead.
I still use beginAnimations...commitAnimations style animations for code that's targeted to OS versions <4.0.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Thanks! You can't imagine how much i spent on google with this problem. X(
I tried using the animateWithDuration as you both said, but unfortunately, it gave me the "uiview may not able to respond to...." warning..
apparently my OS version is too old. :/
(sorry, im a windows user most of the time... :S)
Anyways, Imma gonna try to update my OS and try those codes! But I did some research myself, Im sure it's gonna work!^^ Thanks so much!!
Thanks! You can't imagine how much i spent on google with this problem. X(
I tried using the animateWithDuration as you both said, but unfortunately, it gave me the "uiview may not able to respond to...." warning..
apparently my OS version is too old. :/
(sorry, im a windows user most of the time... :S)
Anyways, Imma gonna try to update my OS and try those codes! But I did some research myself, Im sure it's gonna work!^^ Thanks so much!!
Yes, the animateWithDuration: methods require iOS 4.0 or later.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.