Lochie Short
Aspiring developer
Profile
Posts: 16
Reg: Oct 23, 2012
Lara, Geelong, ...
1,960
09/18/13 01:04 AM (12 years ago)

Error With My Xcode, Again!

Hi Guys, I am Stuck with a little bit of programming in Xcode, i am having a go at the cheat sheet. this is where some problems are: (.h) #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "BT_viewController.h" @interface BT_screen_blank : BT_viewController { UIImageView *imgViewBug; UIImageView *imgViewSplat; UIButton *buttonStart; NSTimer *gameLoopTimer; CGPoint destination; CGFloat xamt; CGFloat yamt; CGFloat speed; } @property (nonatomic, retain) UIImageView *imgViewBug; @property (nonatomic, retain) UIImageView *imgViewSplat; @property (nonatomic, retain) UIButton *buttonStart; @property (nonatomic, retain) NSTimer *timerGameLoop; @property (nonatomic) CGPoint destination; @property (nonatomic) CGFloat xamt; @property (nonatomic) CGFloat yamt; @property (nonatomic) CGFloat speed; -(BOOL)intersecting:(CGPoint)touchLocation:(UIImageView *)imageViewBug; (problem here ^, Yellow warning not a red one) -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; -(void)startGame; -(void)endGame; -(void)moveBug; ____________________________________________________ so then i have a problem in my .m file: //checks if tap intersects bug image.. -(BOOL)intersecting:(CGPoint)touchLocation:(UIImageView *)imageViewBug{ ___________________________ The red problem shown here says "Use of undeclared identifier 'intersecting'". In the .h file it says "'touchLocation' used as the name of the previous parameter rather than as part of the selector" If you have any suggestions please do tell me, Thanks in advance, Lochie. :-)
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/18/13 06:29 AM (12 years ago)
What you're experiencing is iOS5 code in iOS6. The core issue is the way the method parameters are laid out; in iOS5 you could get away with an 'abbreviated' method. In iOS6, you have to completely lay it out. However, because it's a custom method, and not exactly stock, I'm not sure which parameters need to be modified, and I haven't found any past posts that address the issue. Fingers crossed, maybe something will pop up sooner than later. Cheers! -- Smug
 
Lochie Short
Aspiring developer
Profile
Posts: 16
Reg: Oct 23, 2012
Lara, Geelong, ...
1,960
like
09/18/13 02:43 PM (12 years ago)
Thanks a lot smug!! i am just wondering what a parameter is and how i change from iOS5 to iOS6. Thanks again, Lochie
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.