'reposnd'에 해당되는 글 1건

  1. 2010.10.23 [아이폰 앱 개발] warning: X may not reposnd to Y 관련
아이폰어플개발정보2010. 10. 23. 14:51
[아이폰 앱 개발] warning: X may not reposnd to Y 관련
Originally Posted by occular 
I'm just wondering what the usual way is of fixing "warning: X may not reposnd to Y" warnings?

I can see what the problem is, just not sure of the best way to fix it...
This is a method in a controller of mine that subclasses UIViewController:

- (void)viewWillAppearBOOL)animated {
[[self view] setupAnimation];

The '[self view]' gives us the "UIView view" field inherited from UIViewController, and the compiler of course can't tell that the UIView in question responds to the setupAnimation message.

So what is the best way to fix this situation?
Would adding a selector check be the way forward?

Ok, so it turns out that plain old casting is fine as the solution:

[(MyView*)[self view] setupAnimation];

For some reason I got it into my head that casting wasn't the objective c 'way' or something, but apparently that is not the case!
Posted by 오늘마감

댓글을 달아 주세요