Basic Registration Page - iOS

2019-09-11 02:41发布

问题:

I am a complete beginner with iOS (started yesterday). I am trying too create a simple register page with text boxes and labels.

I have done this with a UITable view - which looks pretty decent for a first attempt.

However, I am facing an issue where the bottom values on my form are hidden by the keyboard. Even after I changed the Return Key to next (i assume this should send the cursor and the focus to the next column?)

Can someone offer some advise on how this can be solved? The below screen shot shows phone number field is hidden and my submit button :(

回答1:

use this TPKeyboardAvoidingTableView Instead of UITableview in your project.

download class of TPKeyboardAvoidingTableView download and add your project.

in your .h file add

#import "TPKeyboardAvoidingTableView.h"

define propery of tableview

@property(nonatomic,retain) IBOutlet TPKeyboardAvoidingTableView *TableViewRate;

and also change class of UITableView to TPKeyboardAvoidingTableView as below image.

When you click on textfiled its auto set it frame according to Keyborad. so each textfield is shown when update.