ios - Fading in a background on opening a view -


seems simple, can't work different methods try.

all want do, fade in image black background when open new view controller.

so far i've tried this:

//i've set image alpha 0 on storyboard  - (void)viewdidload {     [uiview animatewithduration:5.0                           delay:0                         options: uiviewanimationoptioncurveeasein                      animations:^{                          myimage.alpha = 1;                       }                      completion:^(bool finished){                          nslog(@"done!");                      }];     } 

it runs, , image comes (just doesn't seem animating!)
know simple question have spent hours looking solution.
if appreciated!
thanks!

animation should work within -viewdidload may doing more in -viewdidload disrupting animation.
or...
instead move animation code -viewdidappear:

-(void)viewdidappear:(bool)animated {     //do animation here     } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -