转到 IQUIView+IQKeyboardToolbar.m 文件并进行以下更改
只需更改以下方法的东西
- (void)addPreviousNextDoneOnKeyboardWithTarget:(id)target previousAction:(SEL)previousAction nextAction:(SEL)nextAction doneAction:(SEL)doneAction titleText:(NSString*)titleText
- (void)addPreviousNextRightOnKeyboardWithTarget:(id)target rightButtonImage:(UIImage*)rightButtonImage previousAction:(SEL)previousAction nextAction:(SEL)nextAction rightButtonAction:(SEL)rightButtonAction titleText:(NSString*)titleText
- (void)addPreviousNextRightOnKeyboardWithTarget:(id)target rightButtonTitle:(NSString*)rightButtonTitle previousAction:(SEL)previousAction nextAction:(SEL)nextAction rightButtonAction:(SEL)rightButtonAction titleText:(NSString*)titleText
在上面列出的方法中找到下一个按钮代码
//下一步按钮
IQBarButtonItem *next = [[IQBarButtonItem alloc]initWithImage:imageRightArrow style:UIBarButtonItemStylePlain target:target action:nextAction];
//替换为这段代码
IQBarButtonItem *next = [[IQBarButtonItem alloc] initWithTitle:@"Next" style:UIBarButtonItemStylePlain target:target action:nextAction];
在上面列出的方法中找到上一个按钮代码
//上一个按钮
IQBarButtonItem *prev = [[IQBarButtonItem alloc] initWithImage:imageLeftArrow style:UIBarButtonItemStylePlain target:target action:previousAction];
//替换为这段代码
IQBarButtonItem *prev = [[IQBarButtonItem alloc] initWithTitle:@"Previous" style:UIBarButtonItemStylePlain target:target action:previousAction];