ios - Make an image view every time at launch -


i want splash image fade after 1 second after launch.

so on top of .xib put image view splash image, (

first actual splash screen shows, when xib loaded image view same image shown, making it's same splash screen

)

i use code in viewcontroller.m fade image

[uiimageview beginanimations:nil context:null]; [uiimageview setanimationduration:1.0]; [imageloading setalpha:0]; [uiimageview commitanimations]; 

this works, if user goes xib , later switches back, shows 1 second splash screen again.

i tried in viewcontroller.m

-(bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {  [uiimageview beginanimations:nil context:null]; [uiimageview setanimationduration:1.0]; [imageloading setalpha:0]; [uiimageview commitanimations];  return yes;  } 

but apparently it's not getting called.

is there other way, make image view fade @ launch?

thanks lot,

set property in app delegate . eg @property(nonatomic,assign) bool isfirsttime;

in appdelegate's -(bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions method, set no.

then in viewcontroller, check value. if yes, show animation , set no. if no, nothing.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -