I added a UITextView to the storyboard that in this case I created a property and connected to the UIView subtitle (called FieldView). The property was like this:
@property (strong, nonatomic) UITextView * instructions;
That FieldView is a property of viewController
@property (strong, nonatomic) IBOutlet FieldView *fieldView;
When I wanted to hide the UITextView * instructions with the code in the viewController, I declared a property in the .h file, so that I could eventually do this when the button was clicked
self.fieldView.instructions.hidden = YES;
However, xcode gives me an error
illegal redeclaration of property in class extension FieldView, attribute must be readwrite while its primary must be readonly
When I added readwrite to the .h and .m files
@property (weak, nonatomic, readwrite) IBOutlet UITextView *instructions; it said `perhaps you intended this to be a readwrite redeclaration of a readonly public property
What is the correct way to do what I'm trying to do?
source share