When you enter a price, the keyboard that pops up requires only digits and a decimal point. The keyboard that pops up does not have a finish key, and you want to exit the keyboard by clicking Exit, but for a better user experience, add Uitoolbar on the keyboard.
Set Toolbar:
-(Uitoolbar *) Addtoolbar {Uitoolbar*toolbar = [[Uitoolbar alloc] Initwithframe:cgrectmake (0,0, Cgrectgetwidth (Self.view.frame), -)]; Toolbar.tintcolor=[Uicolor Blackcolor]; Toolbar.backgroundcolor=[Uicolor Lightgraycolor]; Uibarbuttonitem*previtem = [[Uibarbuttonitem alloc] Initwithtitle:@"<"Style:uibarbuttonitemstyleplain target:self Action: @selector (Prevtextfield:)]; Uibarbuttonitem*nextitem = [[Uibarbuttonitem alloc] Initwithtitle:@">"Style:uibarbuttonitemstyleplain target:self Action: @selector (Nexttextfield:)]; Uibarbuttonitem*flbspace =[[Uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemflexiblespace target:nil Action:nil] ; Uibarbuttonitem*doneitem = [[Uibarbuttonitem alloc] Initwithtitle:nslocalizedstring (@"Complete", nil) Style:uibarbuttonitemstyleplain target:self action: @selector (Textfielddone)]; Toolbar.items=@[previtem,nextitem,flbspace, Doneitem]; returntoolbar;}
Add Toolbar for TextField:
_textfield.inputaccessoryview = [self addtoolbar];
Realize:
iOS adds a Finish button to the numeric keypad