模式视图 键盘消失 问题

   if(starttextfield==nil){

            starttextfield=[[UITextFieldalloc]initWithFrame:CGRectMake(0, 0, 10, 10)];

            }

           

            starttextfield.backgroundColor=[UIColorredColor];

            UIView* viewTemp1 = [[UIView alloc]init];

            viewTemp1.backgroundColor=[UIColorclearColor];

            starttextfield.inputView=viewTemp1;

            [self.view addSubview:starttextfield];

            [viewTemp1 release];

            

            [starttextfieldbecomeFirstResponder];

 

// 必须要设置 inputView 之后 将textField设置为第一响应者 才可以

posted @ 2012-09-14 10:17  zander  阅读(190)  评论(0编辑  收藏  举报