Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7965129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:03:55+00:00 2026-06-04T06:03:55+00:00

I need all my view controllers to be able to show the Message compose

  • 0

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 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:03:56+00:00Added an answer on June 4, 2026 at 6:03 am

    If these are messages that BaseMessageViewController sends to self, there’s no reason to define a protocol. Just declare the methods in BaseMessageViewController, and comment the declarations to describe when they are sent.

    You will also need to provide implementations of the methods in BaseMessageViewController to suppress a compiler warning. If you want every subclass to implement the methods, you can define the methods in BaseMessageViewController using this pattern:

    - (void)processMessageCancelled {
        [self doesNotRecognizeSelector:_cmd];
        abort();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 4 UIViews inside of a main view controller view. All I need
I have a simple table view which is editable. All I need the user
I need all records which have year entered from search criteria. for ex: String
i need all permutation from N lists, i dont know N until the program
I think the question is pretty simple, do I need all the rest of
i have a string which has the following format (3,1,Mayer,Jack). I need all 4
I need loging all HTTP request (from any application). I have Delphi 7.0. Anybody
I need get all items these have no categories int? categoryId = null; var
I have multiple threads who all need to write to the same Dictionary. I
What's the minimum JavaScript I need if all I want to do is use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.