Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
1 つの xib ファイルにピッカー ビューがあり、別のファイルにマップ ビューがあります。ユーザーは、ピッカー ビューでマップ ビューを選択し、ボタンをクリックすると、mapView が読み込まれます。ただし、ピッカー ビューの xib ファイルに戻ると、ピッカー ビューは既定の選択に戻ります。ピッカー ビューで、ユーザーが以前に選択した mapView を自動的に選択するにはどうすればよいですか?
XIB から離れたときに選択を保存し、戻ってきたときに再選択するように伝えます。
http://developer.apple.com/iphone/library/documentation/uikit/reference/UIPickerView_Class/Reference/UIPickerView.html#//apple_ref/occ/instm/UIPickerView/selectRow:inComponent:animated :