0
如果我想從視圖1獲得一個Label.text, 所以我在firstView.h我怎麼能拿對象從另一個類
@interface RootViewController : UITableViewController {
NSMutableArray *menuList;
}
@property(nonatomic,retain)NSMutableArray *menuList;
@end
設置secondView.h
@interface SecondViewController : UIViewController <UIPickerViewDelegate,UIPickerViewDataSource> {
UILabel *comboView;
}
@property (nonatomic,retain)UILabel *comboView;
@end
in secondView.m
FirstViewController *firstViewController = [[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:nil];
[firstViewController.menuList addObject:comboView.text];
但是當我想從menuList中的firstView(self.menuList)中獲取對象時 它變成了「null」!
有什麼問題? 感謝
迷你
如果您需要一些幫助,請將您的代碼標記爲示例代碼。 – 2011-01-14 10:38:17