Situation: A protocol A implements a protocol B. B has some @optional and some (@)required methods.
Question: Is it possible in protocol A to set a method from B to the opposite (opt. to reeq. and vv.)?
Cheers!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You probably mean protocol A extends/enhances B.
Making a required method optional would break existing code. You can use an implementation of A where B is needed, but you don’t provide a method that is required – so going from req. to opt. doesn’t make sense at all.
The other way around should work from a logical point of view. Have not tested it, though, but firing up your compiler should take less than a minute.