4525 Views 2 Replies Latest reply: Aug 10, 2008 5:33 AM by Mario Kadastik
Ok, I solved the view not allowing touches through point. Instead of letting the taps go through I catch the tap with touchesEnded and check if it's in the overlay view which is blinking. if they are I execute the change back to the main view and remove the blinking view from visible state.
However this is not the most elegant way of doing it and I'd prefer to animate the UIBarButtonItem itself. Especially as I use the UIBarButtonItemStylePlain with a toolbar of black tint and I'd love to instead of customly trying to come up with an indication use instead the same white circle appearance every 0.7-1s that is drawn by the button when you tap on it. Any ideas on how to do that?
Ok, I solved it myself :P I couldn't quite do it through the UIBarButtonItem, but what I did was to add a new layer to the main view which was about the size of the button and set the contents of that layer to be an image of a white gradient to transparency. I set the initial opacity to 0.0 and then when an accessory view is displayed I start animating the opacity property of that layer between 0.0 and 0.6. As the layer lets the touches through then the button works and in the process of redisplaying the main view I remove the animation from the layer. Voila, I have an identical look to it as I originally wanted. I will mark the question as solved, but if someone has a more elegant way of doing this then let me know.