uianimation

Problems with transitionWithView and animateWithDuration

旧街凉风 提交于 2019-11-29 03:39:56
问题 I have problems with transitionWithView and animateWithDuration . One of my animateWithDuration blocks doesn't transition, it is a sudden change, and transitionWithView does not temporarily disable user interaction. I have checked the docs and believe I am doing everything correctly, but obviously something is wrong. Here are the two blocks of code: This is in my main View Controller ViewController which has three container views/child view controllers. This block moves one of the container

iOS animations stop working in my app in iOS7

早过忘川 提交于 2019-11-29 02:55:46
问题 I am seeing that all ios animations in my app stop working.Its happening very frequently in iOS7. Hey guys I had an app which is supporting iOS 5, 6 and 7.I am seeing recently that all iOS animations stop working in the app in iOS7?? 回答1: In IOS 7 when some main method action is performed on background thread then the animations get disabled. so for this you need to re-enable the animations like (A workaround) [UIView setAnimationsEnabled:YES]; May be this can help. 回答2: I ran into this

UIView animation prevents touch events? [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-11-28 07:42:59
问题 This question already has an answer here: UIView animations canceling any touch input? 2 answers On Objective-C when animation starts on the UIView, no touch interaction is accepted. how can we handle this? 回答1: Use UIViewAnimationOptionAllowUserInteraction as an option parameter in method animateWithDuration:delay:options:animations:completion: UIViewAnimationOptions 来源: https://stackoverflow.com/questions/17810576/uiview-animation-prevents-touch-events

How to use the default iOS7 UIAnimation curve

ぐ巨炮叔叔 提交于 2019-11-28 06:25:53
iOS7 animations don't behave the same way as in iOS6. They appear to use a different bezier curve. Where iOS6 uses a kind of "easeInOutSine" curve, iOS7 is more of the "easeInOutExpo" kind. ( http://matthewlein.com/ceaser/ ) Is there a way to use that curve? I want to sync my animations when the keyboard opens/closes. Here's how I do it (at least when the keyboard is about to be shown) - (void)keyboardWillShow:(NSNotification *)notification { NSDictionary *keyboardAnimationDetail = [notification userInfo]; UIViewAnimationCurve animationCurve = [keyboardAnimationDetail

iOS translation and scale animation

家住魔仙堡 提交于 2019-11-28 05:01:58
I'm working on UIButton animation where: The UIButton is set in the bottom center of the screen and scaled to a small size _menuBtn.transform = CGAffineTransformMakeScale(0.1f, 0.1f); When the app starts it should be moving to the bottom left side of the screen as it scales or grow to its original size. - (void)viewDidLoad { [super viewDidLoad]; _menuBtn.frame = CGRectMake(160, 513, 30, 30); _menuBtn.superview.frame = CGRectMake(160, 513, 30, 30); _menuBtn.transform = CGAffineTransformMakeScale(0.1f, 0.1f); NSLog(@"_menuBtn: %@ ; _menuBtn.superview: %@", _menuBtn, _menuBtn.superview); [UIView

Is UILabel's backgroundColor not animatable?

让人想犯罪 __ 提交于 2019-11-28 01:52:41
问题 I have a gridView, I use to display several GridViewCell : UIView . The GidViewCell adds an UILabel to itself and attaches an UITapGestureRecognizer to itself. UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)]; [self addGestureRecognizer:gestureRecognizer]; [gestureRecognizer release]; in tapped: I want to play some animation, including changing the background color of the label - (void) tapped:(id)sender { [UIView

UIView animations canceling any touch input?

馋奶兔 提交于 2019-11-27 09:02:06
I have a UIScrollView here where I'm adding displaying a label in the middle of the screen when the user has scrolled to a page, the problem is that while the animation is going the user can't scroll to the next page (all user interaction seem to be disabled) until the animation is over. Here's my code for displaying the label. if(!scrollView.dragging) [UIView animateWithDuration:0.3 delay:0.3 options:UIViewAnimationOptionCurveEaseOut animations:^(void){ [vesselNameLabel setFrame:frame]; } completion:^(BOOL finished){}]; So how would I get out of this canceling user interaction on the

How to use the default iOS7 UIAnimation curve

被刻印的时光 ゝ 提交于 2019-11-27 05:41:45
问题 iOS7 animations don't behave the same way as in iOS6. They appear to use a different bezier curve. Where iOS6 uses a kind of "easeInOutSine" curve, iOS7 is more of the "easeInOutExpo" kind. (http://matthewlein.com/ceaser/) Is there a way to use that curve? I want to sync my animations when the keyboard opens/closes. 回答1: Here's how I do it (at least when the keyboard is about to be shown) - (void)keyboardWillShow:(NSNotification *)notification { NSDictionary *keyboardAnimationDetail =

iOS translation and scale animation

♀尐吖头ヾ 提交于 2019-11-27 00:37:39
问题 I'm working on UIButton animation where: The UIButton is set in the bottom center of the screen and scaled to a small size _menuBtn.transform = CGAffineTransformMakeScale(0.1f, 0.1f); When the app starts it should be moving to the bottom left side of the screen as it scales or grow to its original size. - (void)viewDidLoad { [super viewDidLoad]; _menuBtn.frame = CGRectMake(160, 513, 30, 30); _menuBtn.superview.frame = CGRectMake(160, 513, 30, 30); _menuBtn.transform =

UIView animations canceling any touch input?

这一生的挚爱 提交于 2019-11-26 14:27:23
问题 I have a UIScrollView here where I'm adding displaying a label in the middle of the screen when the user has scrolled to a page, the problem is that while the animation is going the user can't scroll to the next page (all user interaction seem to be disabled) until the animation is over. Here's my code for displaying the label. if(!scrollView.dragging) [UIView animateWithDuration:0.3 delay:0.3 options:UIViewAnimationOptionCurveEaseOut animations:^(void){ [vesselNameLabel setFrame:frame]; }