2011-12-05 16 views

答えて

0
hi just check this link you will find the demo example their. [Click Here][1] 


    [1]: http://www.roseindia.net/tutorial/iphone/examples/UIPickerView/UIPickerViewExample.html 

and for the store data in appdelegate // 
in .h 
@interface Hiar_Style_NewAppDelegate : 
{ 
NSString *strselect; 
} 
@property(nonatomic,retain)NSString *strselect; 

in .m 
@synthesize strselect; 

and whenever you want to use it just make delegate of app deegate file like this 

Hiar_Style_NewAppDelegate *objappdel=(Hiar_Style_NewAppDelegate *)[[UIApplication sharedApplication]delegate]; 


and use that object like this 

[email protected]""; 
+0

ウル答えをありがとう - 私は中appdelegateクラスのデータを保存するためのコードを書く方法いけません。私はpickerviewを選択して正確に保ちましたが、データを保存するコードが必要です。 –

+0

あなたは選択したデータを保存したいのですか? – Kartik

+0

ピッカー項目を選択すると、テキストフィールドに詳細を入力して保存する必要があります(自動的にコードはアプリケーションデリゲートクラスになります) - (void)save { // [self categorySelection]; [self dismissModalViewControllerAnimated:YES]; } –

関連する問題