开发者

Trouble in type casting or any ideas?

开发者 https://www.devze.com 2022-12-27 07:02 出处:网络
I write code below but it gives warning.. I identified dbdesc as a NSString but nothing changes.. How will I handle with this 开发者_JAVA技巧type of warnings?

I write code below but it gives warning.. I identified dbdesc as a NSString but nothing changes.. How will I handle with this 开发者_JAVA技巧type of warnings?

**[self.searchDetailViewController setText:appDelegate.dbdesc];**

warning:'searchDetailViewController' may not respond to 'setText:' (Messages without a message method signatures will be assumed to return (id) and accept '...'as arguments )


The problem is because the compiler is not aware of the 'setText' method of your searchDetailViewController property.
Be sure that you defined the method in your header (.h), within the class interface, and that you include the header.
It has nothing to do with the type of your dbdesc variable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号