Problem setting UIImageView Image

2019-09-03 10:53发布

I am trying to set my imageview:

detailedEventViewController.thumbnail.image = [UIImage imageNamed:@"amnesia.png"];

but get the error:

2011-01-08 09:53:24.153 HD Pocket Vacations[24697:207] -[DetailedEventViewController thumbnail]: unrecognized selector sent to instance 0x624d820
2011-01-08 09:53:24.247 HD Pocket Vacations[24697:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DetailedEventViewController thumbnail]: unrecognized selector sent to instance 0x624d820'

My outlets are wired up correctly.

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-03 11:20

There must be a problem with your "thumbnail" property.

As such, you'll need to check:

  1. Whether it's been correctly defined and synthesized within your interface and implementation file(s).

  2. Whether it's an UIImageView.

  3. The spelling on all of the above.

查看更多
登录 后发表回答