Note that there are some explanatory texts on larger screens.

plurals
  1. POThis class is not key value coding-compliant for the key... again
    primarykey
    data
    text
    <p>I have a details screen of some entity in my project (it is 'photo', actually), that can has comments. If it does, screen shows 3 the most recent and the button 'See all'. The problem was how to display that 3 comments. (On Android I simply use LinearLayout for that.) TableView is not suitable as I can see (due to has static height), so I decided to created my custom template/partial view CommentView and add it to scrollView for each comment.</p> <p>I created XIB-file with view and some child controls (user photo, user name, date, text). Also, I created class CommentView, delivered from UIView. File's owner is set to CommentView. Class of the top-level view is also set to CommentView (I tried various combinations). I created outlet from top-level view (vContent) and from all of child views.</p> <p>This is CommentView.h:</p> <pre><code>@interface CommentView : UIView @property (strong, nonatomic) IBOutlet CommentView *vContent; @property (weak, nonatomic) IBOutlet UIImageView *ivUserPhoto; @property (weak, nonatomic) IBOutlet UILabel *lUserName; @property (weak, nonatomic) IBOutlet UILabel *lCreated; @property (weak, nonatomic) IBOutlet UILabel *lText; @end </code></pre> <p>This is CommentView.m:</p> <pre><code>#import "CommentView.h" @implementation CommentView -(void)awakeFromNib { [[NSBundle mainBundle] loadNibNamed:@"CommentView" owner:self options:nil]; [self addSubview: self.vContent]; } @end </code></pre> <p>Then I tried to add comments into entity's view and got that error from question title. It's not the first time I got it but now I really don't know what the problem is...</p> <p>Error occurs on this line (I call it from PhotoViewController):</p> <pre><code>CommentView *commentView = [[[NSBundle mainBundle] loadNibNamed:@"CommentView" owner:self options:nil]objectAtIndex:0]; </code></pre> <p><img src="https://i.stack.imgur.com/Az6JD.png" alt="enter image description here"></p> <p>The full text: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ivUserPhoto.'</p> <p>I really appreciate your help! Thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload