3つのUITextFieldを使用して単純なGUIを作成しました
[送信]をクリックすると、テスト用のボタンが追加されました。3つのテキスト値を印刷しました...各フィールドのテキストボックスに入力します...ここに何がありませんか?送信する前に、モバイルデバイスのディスクに保存する必要がありますか?
IOSバージョン5.0ベータ
#import <UIKit/UIKit.h>
@interface CloudClientViewController : UIViewController
{
@private
UITextField *usernameData;
UITextField *passwordData;
UITextField *ngccData;
UIButton *submitButton;
}
@property (nonatomic,retain) IBOutlet UITextField *usernameData;
@property (nonatomic,retain) IBOutlet UITextField *passwordData;
@property (nonatomic,retain) IBOutlet UITextField *ngccData;
@property (nonatomic,retain) UIButton *submitButton;
-(IBAction)submitButton:(id)sender;
@end
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
/*
Allocting memory for the username password and the ngcc server
*/
usernameData = [[UITextField alloc]init];
passwordData = [[UITextField alloc]init];
ngccData = [[UITextField alloc]init];
}
-(IBAction)submitButton:(id)sender
{{
NSLog(@"The value that was entered to usernameData is: %@",usernameData.text);
NSLog(@"The value that was entered to passwordData is: %@",passwordData.text);
NSLog(@"The value that was entered to ngccData is: %@",ngccData.text);
}
GUIプロンプトが表示されたら、UITextFieldフィールドに文字列としてtestを入力し、[送信]をクリックします。テスト文字列が値として表示されるのではなく、nullが表示されることを期待しています。
アイデア?
GNU gdb 6.3.50-20050815(Appleバージョンgdb-1705)(2011年7月5日火曜日07:28:08 UTC)Copyright 2004 Free Software Foundation、Inc. GDBはフリーソフトウェアであり、GNU GeneralPublicLicenseの対象です。特定の条件下で変更および/またはコピーを配布することを歓迎します。「showcopying」と入力して条件を確認します。GDBの保証は一切ありません。詳細については、「保証の表示」と入力してください。このGDBは、「x86_64-apple-darwin」として構成されました。sharedlibraryapply-load-rulesallプロセス10248にアタッチしています。2011-07-2716:52:56.235 CloudClient [10248:207]usernameDataに入力された値は次のとおりです。 (null)2011-07-27 16:52:56.237 CloudClient [10248:207] passwordDataに入力された値は次のとおりです:(null)2011-07-27 16:52:56.238 CloudClient [10248:207] ngccDataに入力されたのは:(null)