I wasn't expecting my program to put up a fuss when I wrote this line of code:
[twitterFeed setDelegate:self];
twitterFeed is a UIWebView set to go to Twitter's mobile site, but that's beside the point. I'm getting the error "Sending 'SocialView (the name of the class that this is in) to parameter of incompatible type 'id'. I don't know how to fix it. Is there any way to do this quickly and without restructuring my code too much?
Also, it is worth noting that SocialView is a UIViewController, if that's at all important to you.
You could put <UIWebViewDelegate>
in your SocialView
interface declaration and see if that fixes the warning:
@interface SocialView : UIViewController <UIWebViewDelegate> {
...
}
If you are in a static method (with a +), you can manually get ride of the warning with a cast:
[twitterFeed setDelegate:(id<UIWebViewDelegate>)self];
If you are in an instance method (with a -), you should follow chown solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With