objective c - How to fix 'imageNamed:' error -
i trying create programme randomly generate photo. using code so:
int imageswitch = rand() % 2; switch (imageswitch) { case 0: picture.image = [uiimageview imagenamed:@"8292.jpg"]; break; case 1: picture.image = [uiimageview imagenamed:@"apple sauce.jpg"]; default: break;
however, same error imagenamed:
, "no known class method selector 'imagenamed:'" know how prepare error?
imagenamed:
class method of uiimage
, not uiimageview
.
objective-c error-handling uiimageview
No comments:
Post a Comment