2011-04-25 34 views

回答

0

你可以內部viewWillDisappear打電話給你的UIViewController來獲得當前國家

- (NSInteger)selectedRowInComponent:(NSInteger)component 

然後NSInteger的轉換爲NSNumber的,並保存NSUserDefaults的它。

時,它的回來在視圖控制器的viewWillAppear中或viewDidLoad中的視圖(取決於你的項目),你可以從默認檢索NSInteger的,並用它來打電話

- (void)selectRow:(NSInteger)row inComponent:(NSInteger)component animated:(BOOL)animated 

設置動畫BOOL到如果您不想在每次進入該視圖時都觀看動畫,請選擇否。

希望這會有所幫助

相關問題