How can I fix my code?
Hey everyone!
I was just starting to code the beggining of my iPad code, and this came up. Anyone know how I can fix it? I can take me screenshots if needed.
Thanks!
MacBook Pro (13-inch Mid 2012), OS X Mavericks (10.9)
It looks like you've got code outside of a method. Does the closing bracket above the line with the error end a method definition?
What do you mean by the method definition? Sorry I'm pretty new to this
Oh it also has the same error on the if(UI_UserInterfaceIdomPhone) blah blah blah line if that helps
sample.h
-(void)aMethod;
sample.m
-(void)aMethod
{
// do something here
}
A method is a set of steps performed when the method is triggered.
Defined in the .h (interface)
Implemented in the .m (implementation)
You should Google some resources so you understand the basics.
Then come back.
Oh I was thinking that! I put a method above the UI_User...Phone line, but I also want to use the same method for the Pad.
Oh just thought of something that I'll try that might make it work
Fixed it on my own. Thanks for your help
How can I fix my code?