Alright basically I have a very simple task:
Show my Default.png image on my UIImageView, add it to my current view, run a function after 3 seconds that removes the UIImageView from my current view and releases it.
I have several issues though, the first being more important, I can't access ivSplash in the dismissSplashScreen function, since it's declared (as a local variable) in the viewDidLoad function.
Normally, I'd just declare the variable outside of the function but I've tried this in objective c but that doesn't really work properly (at least the way I do it).
This is the code:
Basically I want to get rid of the splash screen because I do not need it anymore. Any idea's? Thanks.
Show my Default.png image on my UIImageView, add it to my current view, run a function after 3 seconds that removes the UIImageView from my current view and releases it.
I have several issues though, the first being more important, I can't access ivSplash in the dismissSplashScreen function, since it's declared (as a local variable) in the viewDidLoad function.
Normally, I'd just declare the variable outside of the function but I've tried this in objective c but that doesn't really work properly (at least the way I do it).
This is the code:
Code:
- (void)viewDidLoad {
[super viewDidLoad];
UIImageView *ivSplash = [[UIImageView alloc] initWithImage:([UIImage imageNamed:(@"Default.png")])];
[[self view] addSubview:(ivSplash)];
[self performSelector:@selector(dismissSplashScreen) withObject:nil afterDelay:3.0];
}
//Functions
- (void)dismissSplashScreen {
//I want to remove the UIImageView from my view
//Then I will release it from memory? [ivSplash release];
}