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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -