編集中にUITextField
上部にUIScrollView
キーボードが表示されません。どうやってするか?
これで私を助けてください、前もって感謝します。
-(void)viewdidload{
txtsearch =[[UITextField alloc]init];
[txtsearch setFrame:CGRectMake(410, 35,250, 30)];
[txtsearch setBorderStyle:UITextBorderStyleRoundedRect];
txtsearch.placeholder = @"Enter Company/Provider Name";
txtsearch.text=[NSString stringWithFormat:@"%@",appDelegate.searchFieldName];
txtsearch.autocorrectionType = UITextAutocorrectionTypeNo;
txtsearch.font = [UIFont fontWithName:@"Helvetica" size:14];
txtsearch.delegate=self;
txtsearch.clearButtonMode = UITextFieldViewModeWhileEditing;
[testscroll addSubview:txtsearch];
btnSearch = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnSearch addTarget:self
action:@selector(showResults:)
forControlEvents:UIControlEventTouchDown];
[btnSearch setBackgroundImage:[UIImage imageNamed:@"search_button_hover.png"] forState:UIControlStateNormal];
btnSearch.frame = CGRectMake(510, 80, 75, 35.0);
[testscroll addSubview:btnSearch];
if(self.tableView)
[self.tableView removeFromSuperview];
self.tableView=[[UITableView alloc] initWithFrame:CGRectMake(0,210,730,[arr count]*160) style:UITableViewStylePlain];
self.tableView.delegate=self;
self.tableView.dataSource=self;
self.tableView.scrollEnabled = NO;
[testscroll addSubview:self.tableView];
[self.tableView reloadData];
self.tableView.frame = CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y, self.tableView.frame.size.width, self.tableView.contentSize.height);
float ftbl = self.tableView.frame.origin.y + self.tableView.contentSize.height + 30;
testscroll.contentSize=CGSizeMake(768, ftbl);
testscroll.scrollEnabled=YES;
}