开发者

How can I make a ViewController conform to multiple protocols?

开发者 https://www.devze.com 2022-12-26 09:38 出处:网络
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.

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

精彩评论

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

关注公众号