我一直在关注本教程: http: //www.appcoda.com/hello-world-build-your-first-iphone-app/
尝试创建一个简单的 iOS 6 应用程序。
但是我收到一个错误:@interface for 'UIAlertView'...
我有:
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
-(IBAction)showMessage;
@end
在我的AppDelegate.h
文件和
-(IBAction)showMessage
{
UIAlertView *helloWorldAlert = [[UIAlertView alloc]initWithTitle:@"my first app" message:@"hello there world!" delagate:nil cancelButtonTitle:@"dismiss" otherButtonTitles:nil];
[helloWorldAlert show];
}
@end
在我的AppDelegate.m
档案中
我似乎不明白错误表示什么,我尝试了谷歌搜索,但没有更接近找到解决方案,所以我在这里错过了什么?我必须解决什么问题?
确切的错误信息:
No visible @interface for 'UIAlertView' declares the selector 'initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:'