I need to provide a sliding bar in iOS to alert the user that he entered wrong data.
I want it to appear for about 1 second at the top of the screen and then disappear, so something with animcation and commit. but I couldn’t find any good documentation for this.
Any ideas?
Thanks.
First you need an imageView of your notification bar or a button to be animating, which is yourObject.
With this method you put the banner on screen (change coordinates to whatever suites you) Also if you want it flip down as Apple has some of their notifications you can use the rotation, if not just delete that line.
Next just make a timer which after 1 second invokes some method to do the opposite of the one I have posted.
if you want a very simple appear and disappear instead of sliding you can replace the two lines before commitAnimations with