zztop
zztop

Reputation: 781

Remove top line containing Done button from Keyboard Using Storyboard or in Swift

Is there anyway to remove the upper bar that includes a Done button either using storyboard or in code?

I've noticed this Done button varies between IOS versions and is not present in all of them. I don't need it because I have a custom button.

enter image description here

Upvotes: 2

Views: 3931

Answers (2)

Kaushik Jayaprakash
Kaushik Jayaprakash

Reputation: 1

Try initializing the above code with frame zero, it works!

textfield.inputAccessoryView = UIView(frame: CGRect.zero)

Upvotes: 0

Alastar
Alastar

Reputation: 1374

try with setting an empty view as inputAccessoryView, this should work

textfield.inputAccessoryView = UIView()

Upvotes: 6

Related Questions