0
我的應用程序有三個文本字段: 1)用戶名從iPhone應用程序發佈推文
// Initialization code
usernameTextField = [[UITextField alloc] initWithFrame:CGRectMake(20, 5, 280, 30)];//usernameTextField released
usernameTextField.placeholder = @"Username";
usernameTextField.textAlignment = UITextAlignmentLeft;
//Username text field
usernameTextField.backgroundColor = [UIColor clearColor];
usernameTextField.borderStyle = UITextBorderStyleRoundedRect;
usernameTextField.autocorrectionType = UITextAutocorrectionTypeNo;
usernameTextField.keyboardType = UIKeyboardTypeURL;
usernameTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
2)密碼
// Initialization code
passwordTextField = [[UITextField alloc] initWithFrame:CGRectMake(20, 90, 280, 30)];
passwordTextField.placeholder = @"Password";
passwordTextField.textAlignment = UITextAlignmentLeft;
//Password text field
passwordTextField.backgroundColor = [UIColor clearColor];
passwordTextField.borderStyle = UITextBorderStyleRoundedRect;
passwordTextField.autocorrectionType = UITextAutocorrectionTypeNo;
passwordTextField.keyboardType = UIKeyboardTypeURL;
passwordTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
passwordTextField.secureTextEntry = YES;
3)文本查看
textView = [[UITextView alloc] initWithFrame:CGRectMake(5, 10, 310, 180)];
textView.layer.cornerRadius = 8;
textView.clipsToBounds = YES;
textView.font = [UIFont fontWithName:@"Arial" size:16.0f];
什麼最好/快速的方式來使用這些上傳推文直接Twitter,與前兩個登錄細節和鳴叫textView?
您可能還需要檢查出的代碼Ben Gottlieb已經在Github上處理Twitter正在轉向的更新的OAuth認證:http://github.com/bengottlieb/Twitter-OAuth-iPhone – 2010-03-08 13:42:59