yue1liang1chuan 2013-03-12 01:55 采纳率: 0%
浏览 3223

设置UIKeyboardtype出现问题

不知道 怎么能正确设置 UIKeyboardtype

在应用中有两行没有映射到:

_firstTextFieldWebsite.keyboardType = UIKeyboardTypeURL;
_firstTextFieldWebsite.keyboardType = UITextAutocapitalizationTypeNone;   

其他的自定义设置都能运行:

_firstTextFieldWebsite = [[UITextField alloc] init];
_firstTextFieldWebsite.frame = CGRectMake(20, 73, 280, 30);
_firstTextFieldWebsite.placeholder = @"Enter the url here";
_firstTextFieldWebsite.borderStyle = UITextBorderStyleBezel;
_firstTextFieldWebsite.backgroundColor = [UIColor whiteColor];
_firstTextFieldWebsite.delegate = self;
_firstTextFieldWebsite.alpha = 1.0;

//[_firstTextFieldWebsite setKeyboardType:UIKeyboardTypeURL];

_firstTextFieldWebsite.keyboardType = UIKeyboardTypeURL;
_firstTextFieldWebsite.keyboardType = UITextAutocapitalizationTypeNone;

[self.view addSubview:_firstTextFieldWebsite];

不知道哪出现错误了?我的应用是IOS6以上版本。

  • 写回答

2条回答 默认 最新

  • Hooopo 2013-03-12 05:35
    关注

    enablesReturnKeyAutomatically,BOOL值,设置在用户没有输入时returnKey禁用..

    评论

报告相同问题?

悬赏问题

  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥15 如何修改pca中的feature函数
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况