performSelector:(dismissSplashScreen) - it says dismissSplashScreen undeclared

Discussion in 'iOS Programming' started by MythicFrost, Dec 18, 2009.

  1. MythicFrost macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #1
    Hey, I'm trying to do this:
    Code:
    - (void)viewDidAppear:(BOOL)animated {
    	[super viewDidAppear:(BOOL)animated];
    	[self performSelector:(dismissSplashScreen) withObject:nil afterDelay:3.0];
    }
    
    But it says dismissSplashScreen isn't declared? Where do I declare it?
    The other part of the code below is right underneath (I also tried on top) of the viewDidAppear function.
    Code:
    - (void)dismissSplashScreen {
    	self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    	[self dismissModalViewControllerAnimated:(BOOL)YES];
    }
    Any idea's? Thanks.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    You're missing:
    Code:
    [self performSelector:[b]@selector[/b](dismissSplashScreen) ...
     
  3. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    Also the (BOOL) parts here are unnecessary:

    Code:
    [super viewDidAppear:(BOOL)animated];
    
    [self dismissModalViewControllerAnimated:(BOOL)YES];
    animated is already a BOOL, and YES is defined as (BOOL)1, so it's just redundant.
     
  5. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia

Share This Page