Problem setting UIImageView Image

浪子不回头ぞ 提交于 2019-12-11 14:59:03

问题


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:


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.



来源:https://stackoverflow.com/questions/4634977/problem-setting-uiimageview-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!