iphone - how to return keyboard on textfield while textfield on tableview cell in ios -


How can I return the keyboard to the text field, while I have put a textfield on cellfilm, I am using the TextfieldShouldercher method But it is not working, please tell me how do I solve it? This table is my code for the text field set on the work cell

  - (UITableViewCell *) Table view: (UITableView *) Table view CellForUAUIT_Path: (NSIndexPath *) indexPath {static NSString * cellidentitifier = @ "Cell"; UITableViewCell * cell = [[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: cellidentitifier]; If (cell == blue) {cell = [tableview decouwer reusable cell with iddatifier: cell determinator]; } And {[Cell ReadyForius]; } UIImageView * imgview = [[UIImageView alloc] initWithFrame: CGRectMake (30, 10, 70, 70)]; Imgview.backgroundColor = [UIColor blackColor]; [Cell.contentView addSubview: imgview]; UITextField * _nameTF = [[UITextField alloc] initWithFrame: CGRectMake (120, 10, 160, 22)]; _nameTF.placeholder = @ "Customer Name"; _nameTF.layer.borderWidth = 1.0; [Cell. Add contentviewSubview: _nameTF]; _nameTF = Zero; UITextField * _timeTF = [[UITextField alloc] initWithFrame: CGRectMake (120, 37, 160, 22)]; _timeTF.placeholder = @ "" time "; _timeTF.layer.borderWidth = 1.0; [Cell.contentView addSubview: _timeTF]; _timeTF = zero; UITextField * _PhoneTF = [[UITextField alloc] initWithFrame: CGRectMake (120, 64, 160, 22)]; _PhoneTF.placeholder = @ "Phone"; _PhoneTF.layer.borderWidth = 1.0; [Cell.contentView addSubview: _PhoneTF]; _PhoneTF = Zero; Return cell; } Set the textfield as the bottom  return cell  

CellForUreAndExpath / Code> Statement.

  _nameTF.delegate = self; _timeTF.delegate = self; _PhoneTF.delegate = self;   

and

  - (BOOL) textFieldShouldReturn: (UITextField *) textfield {[textField resignFirstResponder]; Yes come back }   

and set your viewcontroller as representative in the .h file

  @interface myviewVC: UIViewController & Lt; UITextFieldDelegate & gt;    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -