开发者

How can I make a ViewController conform to multiple protocols?

I want to include Core Location and I'm trying to follow this tutorial: http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/ and I am using SDK 3.2.2.

@interface MainViewController : UIV开发者_如何学GoiewController <FlipsideViewControllerDelegate>{ is the code right now.


If you want a class to conform to multiple protocols you just separate the protocol names in the <>s with commas:

@interface MyClass : TheSuperclass <Protocol1, Protocol2, Protocol3>
    ...
@end

and so forth.

In your case:

@interface MainViewController : UIViewController <FlipsideViewControllerDelegate, CLLocationManagerDelegate>
    ...
@end


@interface MainViewController : UIViewController <FlipsideViewControllerDelegate, CLLocationManagerDelegate>{

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜