objective c - Trying to fade in a UIView without success -
I am trying to fade in a UIView as a subview of my main view. UIView I am trying to fade in are the dimensions of 320x55.
I set the view and timer;
secondView.frame = CGRectMake (0, 361, 320, 55); SecondView.alpha = 0.0; [Self.view addSubview: secondView]; [NSTM Scheduled timer with interval: 5 targets: Self selector: @Sylector (FeedView) User Inc.: Does not repeat: No];
The timer triggers the following code;
secondView.alpha = 1.0; CABasicAnimation * fadeInAnimation; FadeInAnimation = [with CABasic Animation Animation: @ "Opacity"]; FadeInAnimation.duration = 1.5; FadeInAnimation.fromValue = [NSNumber Number explosion: 0.0]; FadeInAnimation.toValue = [NSNumber Number Flowweight: 1.0]; [FeedInimation Settail: Self]; [second Sight. Add PlayerAnimation: FadeIn for Animation: @ "Anime Opacity"];
My second view is connected to the interface builder and responds to other messages, but I do not see anything on the screen.
Is anyone helping me?
Thank you, Ricky.
In response to the following recommendation:
I am a little unsure here. Initially I have put this code (because I see the second scene as an example of UIVuiE?):
[Second view start permissions: zero reference: zero]; [Second scene set: Animation duration: 0.5]; [Second view set Alpha: 1.0]; [Send second view animation];
I then tried your suggestion which did not generate a warning or error, but it still does not bring anything to the surface:
[UIView startAnimations : Zero reference: zero]; [UIView Set Animation Duration: 0.5]; [Second view set Alpha: 1.0]; [UIView commitAnimations];
Thanks! Ricky.
You should be able to make it a little easier. Have you tried to do something like that?
[UIView Startup Permissions: Zero Reference: NULL]; [UIView Set Animation Duration: 0.5]; [Second view set Alpha: 1.0]; [UIView commitAnimations];
Comments
Post a Comment