嘿,我一直在试图找出为什么我收到这样的警告:访问全球varibile任何类
“TxtAppDelegate”不能为“-TCN” “TxtAppDelegate”回应可能会不响应以“-TID”
,当我尝试使用此代码:
// .h file
@interface RootViewController : UITableViewController <UIActionSheetDelegate> {
NSString *theCompanyName;
NSString *theID;
}
@property (nonatomic, retain)NSString *theCompanyName;
@property (nonatomic, retain)NSString *theID;
// .m
NSString *theCompanyName;
NSString *theID;
@synthesize theCompanyName;
@synthesize theID;
TxtAppDelegate *customObjInstance = [[TxtAppDelegate alloc] init];
theCompanyName = [customObjInstance TCN];
theID = [customObjInstance TID];
我已经添加了,在他们有两个功能.h文件头。代码有效,但我真的想解决警告问题。
任何帮助将是巨大的,解决矿山:)
大卫
是的,谢谢。我忘了那个! :O) – StealthRT 2010-02-26 19:12:37