Curious question about this small function?

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

  1. MythicFrost macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #1
    Code:
    - (void)viewDidAppear:(BOOL)animated { //Line 31
    	[super viewDidAppear:animated];
    	[self performSelector:@selector(dismissSplashScreen) withObject:nil afterDelay:3.0];
    }
    That code works fine, if I remove (BOOL) on the function, it shows a warning saying:
    Any idea's why? Thanks.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Did you declare that method in your header? If so, you should remove it as it's unnecessary. Overriding methods doesn't require that you redeclare it in your header, as the method is already declared in the superclass's header.
     
  3. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #3
    Good to know, but don't think I declared it in my header.
     
  4. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #4
    It's declared in the superclass, you are changing the type (BOOL) to a conflicting type (id).
     

Share This Page