uiviewanimation

iOS UIView Animation Issue

自作多情 提交于 2019-12-04 05:39:39
问题 I have an issue with a UIView animation when switching between pages in a UITabBarController. A view in UIViewControllerA is playing the following animation:- [UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveLinear | UIViewAnimationOptionBeginFromCurrentState animations:^{ CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI); self.animationImageView.transform = transform; } completion:NULL]; The animation is a custom

Weird animations when changing NavigationItem prompt

孤街醉人 提交于 2019-12-04 02:09:23
I have these ViewControllers added in storyboard: None is connected with a custom class, everything is from pure storyboard. Video on iPhone simulator on iOS7 This only happens when using AutoLayout on iOS7. Anyone else seen this? Download sample project of problem sschunara I think this problem occurs when view is getting autolayout and setting it size to main screen size. In iOS 7 navigation push animation come before view size is set so we can see that animating. Don't worry it works well in iOS 8.0 and later. For iOS 7.0 you can give size of view in viewDidLoad so it can adjust size before

fade out image Animation in iphone [duplicate]

守給你的承諾、 提交于 2019-12-03 21:52:49
This question already has answers here : Closed 6 years ago . Possible Duplicate: iphone fading of images How can implement fading out animation in to a set of images(array of images). Images will appear one by one. when i using the code given below it will show only a simple slide show. NSArray *imagearray = [NSArray arrayWithObjects: [UIImage imageNamed:@"image1.png"], [UIImage imageNamed:@"imag2.png"],[UIImage imageNamed:@"imag3.png"],[UIImage imageNamed:@"imag4.png"],[UIImage imageNamed:@"imag5.png"],[UIImage imageNamed:@"imag6.png"],[UIImage imageNamed:@"imag7.png"],nil]; imageview

How do I control the background color during the iPhone flip view animation transition?

亡梦爱人 提交于 2019-12-03 16:16:57
问题 I have some pretty standard flipping action going on: [UIView beginAnimations:@"swapScreens" context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; [UIView setAnimationDuration:1.0]; [self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1]; [UIView commitAnimations]; To Apple's credit, this style of animation is amazingly easy to work with. Very cool, and I've been able to animate transitions, flips, fades etc. throughout the app very

Rotate a UIView clockwise for an angle greater than 180 degrees

邮差的信 提交于 2019-12-03 15:32:32
I'm animating a clock arm from pointing towards 12 o'clock to the current time. If it is say, 11 o'clock, I want the arm to rotate clockwise to the 11 o'clock position. But of course if I use: CGAffineTransform rotation = CGAffineTransformMakeRotation(2*M_PI*11/12); [UIView animateWithDuration:3.0 animations:^{ clockArm.transform = rotation; }]; the rotation goes counterclockwise. I tried: CGFloat angle = 2*M_PI*11/12; CGAffineTransform firstRotation = CGAffineTransformMakeRotation(M_PI-0.001); CGFloat firstRotationTime = 3.0*(M_PI/angle); CGAffineTransform secondRotation =

Cells disappearing during animation of UITableView

拥有回忆 提交于 2019-12-03 14:12:54
I have a normal UITableView in my UIViewController , constrained to fullscreen. This tableView has a custom interactive tableHeaderView . The tableHeaderView is dynamic in size, and expands on its own. The headerView has a textField, and will change its own size depending on wether the textField has focus or not. The problem is that the cells at the bottom of the screen aren't always animating correctly when changing the size of the tableHeaderView. I am calling tableView.beginUpdates() and tableView.endUpdates() after layoutIfNeeded() inside my animation-block. This has to be done, or the

How can blurriness of UIVisualEffectView be modified while dragging in iOS?

本秂侑毒 提交于 2019-12-03 14:04:25
Currently, I'm using a UIVisualEffectView to apply a blur to an image. I have a UIScrollView. As I pull down on the scrollView, in my "scrollViewDidScroll" method, I'm changing the alpha of the UIVisualEffectView. The current behavior of this is that the blur radius changes smoothly as I drag around in the view. The problem is, of course, I'm not supposed to be doing this. Getting warnings about changing the alpha value of a UIVisualEffectView. I've seen people say to do a smooth transition of blurring using an animation, like this here: How to fade a UIVisualEffectView and/or UIBlurEffect in

UIViewController half screen “drawer slide” animation

馋奶兔 提交于 2019-12-03 12:57:18
I am trying to have a UIViewController that appears with a "slide" animation from the right. Not like a Push segue, not like the Facebook app. I want the new ViewController to slide ON TOP of the current one (not push it away), but only cover PART of the screen, leaving the other part showing the first ViewController. What I have tried: The closest that I have gotten is by creating a custom segue with the following: - (void)perform { __block UIViewController *src = (UIViewController *) self.sourceViewController; __block UIViewController *dst = (UIViewController *) self

Preserve Ripple effect over UIImageView

試著忘記壹切 提交于 2019-12-03 09:15:32
I want to preserve Ripple effect on my UIImageView. I know we can animate image for ripple effect , but preserve. In other words I want a rippled image. I know we can animate image using [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:25.0]; [UIView setAnimationTransition:(UIViewAnimationTransition) 110 forView:imgRipple cache:NO]; [UIView commitAnimations]; But it animates , doesn't keep the ripple. I think we can get rippled image if we Pause or Stop animation before it ends. Is it possible? how can we Pause or Stop UIView Animation ? If there is any alternate to this

Reimplement UIView block based animation methods with custom easing curve

我怕爱的太早我们不能终老 提交于 2019-12-03 09:15:10
The lack of custom easing curves in UIView's block based animation methods leads to Core Animation if more advanced curves are needed. A way of doing this with a Category on CAKeyframeAnimation is discussed in How to create custom easing function with Core Animation? . To keep my code clean and maintainable I would like to go a step further and re-implement UIView 's block based methods and include a block describing the easing curve function. resulting category on UIView would look something like this: + (void)animateWithDuration:(NSTimeInterval)duration easingCurveFunction:(double(^)(double)