Trouble in type casting or any ideas?
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.
精彩评论