Cannot assign to property: 'inputAccessoryView' is a get-only property

I do get an error when i assign

measureLabel.inputAccessoryView = toolbar

Cannot assign to property: 'inputAccessoryView' is a get-only property.

My picker view appears on label press . how to solve ?

Replies

What is measureLabel ?


If it is UITextView or UITextField, that's a get / set property.


But for UIView, it is get only.


May be you could change measureLabel to UITextField, and disable control.