Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Allow for nil placeholder text #30

Open
jsm174 opened this issue Mar 24, 2015 · 0 comments
Open

Allow for nil placeholder text #30

jsm174 opened this issue Mar 24, 2015 · 0 comments

Comments

@jsm174
Copy link

jsm174 commented Mar 24, 2015

I have an app with a textview that can go into a "Read Only" mode. When in "Read Only" mode the placeholder gets set to nil, even if the field value is empty or nil.

notesTextView.placeholder = (notesTextView.editable) ?
    @"Enter additional notes..." : nil;

This used to work in SSTextView, however in SAMTextView it crashes:

[89217:450317] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSConcreteAttributedString initWithString:: nil value'
.
.
4   Foundation                          0x0000000103a1eafd -[NSConcreteAttributedString initWithString:attributes:] + 27
5   App                      0x000000010290a664 -[SAMTextView setPlaceholder:] + 1060
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant