Im trying to load a image after splash image goes off.So i thought of adding a imageview to self.window in application did finish launching method.Im picking the image from caches directory.But its showing a blank screen before it loads the rootview controller .
How can i implement this
Here is my code to add a image to imageview and in turn add image view to self.window as sub view….
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
documentsDirectory = [documentsDirectory stringByAppendingPathComponent:@""];
imgView.frame=CGRectMake(0, 0, 768, 1024);
NSString *URLImg = [documentsDirectory stringByAppendingPathComponent:@"SplashIpad.png"];
UIImage *imgAvtar = [[UIImage alloc]initWithContentsOfFile:URLImg];
[imgView setImage:imgAvtar];
[self.window addSubview:imgView];
Please suggest me how to load a image after splash screen goes off.
As par you logic and code you can do like this way:-
DEMO LINK:
In demo i fetch image from NSBundal but you can use my above logic at
didFinishLaunchingWithOptionsmethodhttp://www.sendspace.com/file/8srobj
NOTE:-
Insure that at the Path of
/iPhone Simulator/6.0/Applications/8886B938-3EFB-4F0C-96F9-41ACAE508F2B/Library/Caches/index.jpgthe Image with name ofindex.jpgpalce in catch folder