iPh*_*one 4 iphone objective-c
在我的AppDelegate.h文件中,我编写了以下代码
@interface iBountyHunterAppDelegate : NSObject <UIApplicationDelegate> {
UITabBarController *tabcontroller;
}
@property (nonatomic,retain) IBOutlet UITabBarController *tabcontroller;
Run Code Online (Sandbox Code Playgroud)
在AppDelegate.h文件中我合成它.
@synthesize tabcontroller;
Run Code Online (Sandbox Code Playgroud)
但是在@synthesize行我得到一个错误,并且msg是:"遗产属性执行声明的上下文"
任何人都可以告诉我如何解决它?
我怀疑你把@synthesize@implementation 放在了外面.看起来应该是这样的
// iBountyHunterAppDelegate.m
#import "iBountyHunterAppDelegate.h"
@implementation iBountyHunterAppDelegate
@synthesize tabcontroller; // note that this is between @implementation and @end
// other stuff
@end
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
891 次 |
| 最近记录: |