新手到APP開發,我得到一個問題。當我創建我的文本,然後用戶點擊文本鍵盤出現時,我怎麼能禁用鍵盤來?iPhone應用程序禁用UITextField鍵盤
你能幫我嗎?
這裏是我的UITextField文本代碼:
UITextField *textField1 = [[UITextField alloc] initWithFrame:CGRectMake(108, 31, 105, 22)];
[contentView addSubview:textField1];
textField1.alpha = 1.0;
textField1.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin;
textField1.text = @"my talent";
textField1.borderStyle = UITextBorderStyleNone;
textField1.textAlignment = UITextAlignmentCenter;
textField1.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
textField1.textColor = [UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1.0];
textField1.font = [UIFont fontWithName:@"Helvetica" size:17.0];
[textField1 release];
使用'UILabel'僅讀取數據。 – viral 2013-03-25 11:46:41