ios - Adding UITextField above Keyboard -
i found link how create tool bar above keyboard. don't use textfield need tap , show keyboard. idea press on "leave comment" button , keyboard text field appeared.
so in link i've attached seems use inputaccessoryview of text field interact with. in case don't have text field.
so first of need toggle keyboard without text field , show keyboard textfield bar above keyboard. how can make it?
hello need put uitextfield
outside view, this:
viewcontroller.h
@property (strong, nonatomic) iboutlet uitextfield *_mytextfield;
viewcontroller.m
uitextfield *t = [uitextfield new]; [self.view addsubview:t]; [t becomefirstresponder]; t.inputaccessoryview = _mytextfield;
see result:
Comments
Post a Comment