我想通過iPhone應用程序上的兩個視圖傳遞一個字符串。在我要恢復在.hi字符串我的第二個觀點有:iPhone SDK,通過視圖傳遞字符串
#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"
#import "RootViewController.h"
@interface PromotionViewController : UITableViewController {
NSString *currentCat;
}
@property (nonatomic, retain) NSString *currentCat;
@end
而且在具有的.mi:
@synthesize currentCat;
然而,在第一個視圖控制器,當我嘗試集該變量我得到一個未找到錯誤:
PromotionViewController *loadXML = [[PromotionViewController alloc] initWithNibName:@"PromotionViewController" bundle:nil];
[self.navigationController pushViewController:loadXML animated:YES];
[PromotionViewController currentCat: @"Test"];
這第三行給了我:類方法+ currentCat沒有找到
我在做什麼錯?