uianimation

Can I “curl down” a page on popViewControllerAnimated?

谁说胖子不能爱 提交于 2019-12-22 17:44:08
问题 I can "curl up" a view controller with this code: [UIView beginAnimations:@"animation" context:nil]; [self.navigationController pushViewController:page animated:NO]; [UIView setAnimationDuration:1]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO]; [UIView commitAnimations]; but I can't curl down the last page like this: [UIView beginAnimations:@"animation" context:nil]; [self.navigationController popViewControllerAnimated:NO];

AFNetworking - Fade animation on image while scrolling UITableView

纵然是瞬间 提交于 2019-12-21 04:05:00
问题 I have a Table View which displays images using lazy loading from AFNetworking with a placeholder image. I'm trying to accomplish a way to fade from the placeholder to the image when it's loaded. My code here works, but if an image loads while scrolling the table, everything looks odd and the table stops scrolling. Same thing happens to a Horizontal scroller with the same effect. Here's the code I'm using inside cellForRowAtIndexPath [cell.hotelImage setImageWithURLRequest:[NSURLRequest

iOS - Animation effects - Image pop-in

柔情痞子 提交于 2019-12-20 08:48:41
问题 I'd like to have an image in my iphone app "pop-in" on screen rather than just appearing. By "pop-in" I mean that it would grow from a small dot to its actual size. For reference, this is exactly the same as the "pop" animation effect in Keynote. I'm completely new to iOS animations, so if someone could point me in the direction on the animation effects I would need to use, it would be greatly appreciated. Thanks Brian UPDATE I've added this code from the suggestions below. This works but it

How can I callback as a CABasicAnimation is animating?

眉间皱痕 提交于 2019-12-20 06:04:45
问题 I have an animation I'm using to snap a rotatable UIView to a circular grid. As the view animates, I need to update another view based on the rotating views position. How can I go about getting the position of the rotating view as it animates into position? 回答1: When animation starts you can start a function that will be polling current view position using a timer (I suppose you will need to get presentationLayer from view's layer and get position values from it). There's no callbacks for

Determine which of its animationImages a UIImageView is displaying?

只愿长相守 提交于 2019-12-18 06:57:19
问题 Is there a way to find out which frame of its animation a UIImage is on? When you start it you give it an array of animationImages, so it clearly has to be storing the index of the current image somewhere. Do you know how I can find this out? Also, is there a way to tell a UIImageView which frame to start its animation on? 回答1: I couldn't find neither a property in the documentation, nor a suspicious ivar or private method after class-dumping UIKit, so the best I could think of is: NSDate

AnimationDidStop not being called

蓝咒 提交于 2019-12-13 07:15:49
问题 My animationDidStop method is not being called for some reason, initially I thought it was because the delegate was not set but having remedied that I'm still having the same problem. Any ideas? thanks in advance :) - (void)hideInterfaceButtonClicked : (id) sender { [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationDidStop)]; [UIView beginAnimations:@"MoveView" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView

NSTimer creating a pulse effect in AVAudioPlayer and UIAnimation

落爺英雄遲暮 提交于 2019-12-13 06:03:48
问题 I've made a sound app with a UIVIew .png image ( mouthMeter ) whose alpha I would like to dim according to the averagePowerForChannel coming out of AVAudioPlayer . The alpha is being changed via updates from an NSTimer , meterTimer , 12 times a second (to simulate 12 fps). I also have a second NSTimer , sliderTimer which is updating the position of a UISlider once every second. The dimming seems to be occuring, however there is a second effect of the alpha pulsing to fully-on (1.0). I can

Unable to minimize subview alongside mainView during animation

陌路散爱 提交于 2019-12-13 03:39:38
问题 I have two views, videoView (which is the mainView) and subVideoView (which is the subView of mainView). I am trying to minimize both views using animation at the same time, as shown in the below code. I am able to minimize the videoView (i.e mainView) and not the subVideoView. However, when I hide code for minimising videoView (i.e mainView), I am able to minimise the subVideoView. I believe it has to do something with the way I am animating. Can some one please advice how I can minimise

UIImage is not transitioning using fade with animation block transition

不想你离开。 提交于 2019-12-12 01:49:34
问题 I am doing an image transition using an animation block like this [UIView animateWithDuration:1.0f delay:0.0f options:UIViewAnimationOptionTransitionCrossDissolve animations:^{ self.songTitleLabel.text = currentSong.songTitle; self.artistNameLabel.text = currentSong.songArtist; self.songImageView.image = currentSong.songArtwork; }completion:^(BOOL finished){ self.player = [[AVAudioPlayer alloc] initWithContentsOfURL:currentSong.songLocation error:nil]; [self.player setVolume:1.0]; [self

UIImageview Animation Starts using for-in loop and animation delays

依然范特西╮ 提交于 2019-12-12 01:29:53
问题 I need to animate an UIimageview and when i start animation it happens after long time and i found that memory is leaked somewhere at the time of continuous animation for various image views. All I need to do is i have n number of UIviews in scroll view and each view have an custom button. when that button is selected an animation happens and if animation is in process if the user taps on button that animation will continue and it dont need to start again here is my code for (int i=0; i