I need all my view controllers to be able to show the Message compose view controller (MFMessageComposeViewController) and also handle MFMessageComposeViewControllerDelegate method to see whether a message was sent/cancelled/failed. So my idea was to subclass UIViewController impement these methods in this view controller. And then have all my view controllers that need to be able to send messages subclass the above view controller.
So like BaseMessageViewController : UIViewController
And then ViewController1 : BaseMessageViewController, ViewController2 : BaseMessageViewController and so on...
So when I was at it, I thought I would create a protocol like this:
@protocol MessageProcessing
@required
- (void)presentMessageCompose;
- (void)processMessageCancelled;
- (void)processMessageSent;
- (void)processMessageFailed;
@end
But I'm not sure if BaseMessageViewController should conform to this protocol or if my "concrete" view controllers should conform to it?
One thought was that if my BaseMessageViewController conforms to it then my concrete view controllers would automatically conform to it because of class inheritance? But I'm not seeing any warnings in my concrete view controllers that they are not implementing a required method.
Can someone please give me a helping hand here :)