我已经以UIToolBar编程方式创建了一个并UITextField在其上添加了一个.现在,当我点击另一个文本字段时,我需要将该工具栏放在键盘上方.
UIToolbar *toolBar=[[UIToolbar alloc]initWithFrame:CGRectMake(0,400, 320, 60)];
[self.view addSubview:toolBar];
UITextField *txtView=[[UITextField alloc]initWithFrame:CGRectMake(0, 400, 260, 30)];
txtView.backgroundColor =[UIColor grayColor];
txtView.placeholder=@"Address";
UIBarButtonItem *txtfieldItem=[[UIBarButtonItem alloc]initWithCustomView:txtView];
toolBar.items =[NSArray arrayWithObject:txtfieldItem];
Run Code Online (Sandbox Code Playgroud) 我想创建相同的popUp,如图所示.这个popUp在iPhone中是默认的,但是如果我想用自己的消息进行自定义,我该如何创建呢?
