开发者

expected expression before '.' token

Can someone tell me why this doesn't work?

-(IBAction) website_btn {
    [myAppDelegate viewGallery];
}

B开发者_JAVA技巧ecause I am getting this error.

error: expected expression before '.' token

I know it sounds strange. Need someone to throw me a life jacket here.


If you are compiling with GCC in Xcode, try switching to clang, clang is much better at identifying where there error is, GCC will sometime claim an error is at one location when the actually error is much higher up or even in a header file.


The code you have posted has no issues. It may be due to the error in the code above it. If still the code is fine. Then clean all your target and Build again hope this will work. As it works for many of us..


Thanks everyone!!!!

It was an error I had causing this error.

Just remember to extend your class with UIApplicationDelegate.

...

@interface YourClass : UIViewController <UIApplicationDelegate> {

....

Sorry, I am new to iPhone so I know I am not using proper terms here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜