uiviewanimation

Is there a change to the behaviour of UIKeyboardWillShowNotification in iOS 8?

可紊 提交于 2019-12-01 00:24:42
I have had a simple UIView block animation that handles animating a group of text fields into view when the keyboard will show (and animate them back when the keyboard hides). This has worked fine in iOS 6 & 7, but now I'm getting incorrect behavior, and it all points to some change in UIKeyboardWillShowNotification . I set up an isolated project to test this further on a single text field, with two buttons that call exactly the same methods that are fired for the keyboard's WillShow and WillHide notifications. See the results in this video: Video example This seems like a bug to me, or it

flip animation in swift flips whole view not subviews

被刻印的时光 ゝ 提交于 2019-11-30 19:22:34
问题 I need to switch between two subviews, for that I am using flip animation, but it flips whole screen not subview. Here is the code I used to flip: UIView.transitionFromView(frontView, toView: backView, duration: 1, options: UIViewAnimationOptions.TransitionFlipFromRight | UIViewAnimationOptions.ShowHideTransitionViews, completion: nil) I have created frontView and backView in StoryBoard, and backView hidden initially. Please help me too flip only the subviews. 回答1: This question is old, but

Custom annotation image rotates only at the beginning of the Program (Swift- iOS)

无人久伴 提交于 2019-11-30 16:29:00
Please help out a beginner iOS developer here! :) So, I have a timer which gets the latitude and longitude of a bus periodically from a xml sheet which provides real-time locations of the bus. I was able to setup the parser, animate the bus movement and setup a custom (arrow) image for the bus. However, the problem is, I'm not able to able to rotate the bus-annotation everytime I get new values for the latitude and longitude. The busAnnotation rotates only when the program starts, but not everytime the direction of the bus is updated. Below is my xml parser function, which calculates the

Having problems allowing interaction in UIView animation

拟墨画扇 提交于 2019-11-30 16:12:54
I have the following block of code to fade out an introView(UIView) // Hide intro view after 5 seconds [UIView animateWithDuration: 1.0 delay: 5.0 options: (UIViewAnimationOptionAllowUserInteraction |UIViewAnimationOptionCurveLinear) animations: ^{ introView.alpha = 0; } completion: ^(BOOL finished) { [introView removeFromSuperview]; }]; I have a skip button inside the introVew but there is no interaction whatsoever, am I missing something? I have to add this is a Universal app targeting 3.2 and I'm using XCode 4.2 Vincent Bernier Are you setting your button alpha to 0? If yes here is an

Animating only the image in UIBarButtonItem

心已入冬 提交于 2019-11-30 15:58:06
问题 Ive seen this effect in 2 apps and I REALLY want to find how to do it. The animation is in a UIBarButtonItem, and is only to the image. The image is a + symbol, and it rotates to a X. If you want to see the effect you have to start a conversation with someone and next to the text input theres the + button for images and emoji's. Or heres a video of the effect in another app, after he taps the bar button you see it rotate to a X, http://www.youtube.com/watch?v=S8JW7euuNMo. I have found out how

Animating only the image in UIBarButtonItem

孤人 提交于 2019-11-30 15:21:27
Ive seen this effect in 2 apps and I REALLY want to find how to do it. The animation is in a UIBarButtonItem, and is only to the image. The image is a + symbol, and it rotates to a X. If you want to see the effect you have to start a conversation with someone and next to the text input theres the + button for images and emoji's. Or heres a video of the effect in another app, after he taps the bar button you see it rotate to a X, http://www.youtube.com/watch?v=S8JW7euuNMo . I have found out how to do the effect but only on a UIImageView, I have to turn off all the autoresizing and the view mode

UIView animateWithDuration and UIProgressView setProgress

蓝咒 提交于 2019-11-30 14:37:11
问题 I want to animate my UIProgressView progression from 0 to 1 during 10 seconds. Code: [UIView animateWithDuration:10.0 animations:^{ [_myProgressView setProgress:1 animated:YES]; } completion:(BOOL finished)^{ if (finished) NSLog(@"animation finished); }]; Animation is working fine except that completion and NSLog are always called instantly. I tried animateWithDuration: withDelay: but the delay is not respected and executed immediately. Has anyone encountered the same problem? Thanks for you

UIView animateWithDuration and UIProgressView setProgress

末鹿安然 提交于 2019-11-30 11:13:55
I want to animate my UIProgressView progression from 0 to 1 during 10 seconds. Code: [UIView animateWithDuration:10.0 animations:^{ [_myProgressView setProgress:1 animated:YES]; } completion:(BOOL finished)^{ if (finished) NSLog(@"animation finished); }]; Animation is working fine except that completion and NSLog are always called instantly. I tried animateWithDuration: withDelay: but the delay is not respected and executed immediately. Has anyone encountered the same problem? Thanks for you help. paresh Its an old problem but I am still posting the solution here. The solution turned out to be

Stop an auto-reverse / infinite-repeat UIView animation with a BOOL / completion block

你。 提交于 2019-11-30 11:10:56
I'm setting up the following UIView animateWithDuration: method, with the intention of setting my animationOn BOOL elsewhere in the program to cancel that infinite looped repeat. I was under the impression that the completion block would be called each time a cycle of the animation ends, but this doesn't appear to be the case. Is the completion block ever called in a repeating animation? And if not, is there another way I can stop this animation from outside this method? - (void) animateFirst: (UIButton *) button { button.transform = CGAffineTransformMakeScale(1.1, 1.1); [UIView

UIView touchesbegan doesn't respond during animation

纵饮孤独 提交于 2019-11-30 08:37:00
问题 I have a draggable class that inherits UIImageView. The drag works fine when the view is not animating. But when animating it won't respond to touches. Once the animation is completed the touch works again. But I need it to pause the animation on touches and resume when touch ends. I spent the whole day researching it but couldn't figure out the reason. Here is my animation code. [UIView animateWithDuration:5.0f delay:0 options:(UIViewAnimationOptionCurveLinear |