In a project using ARC, I have a UIViewController
that is handling too many concerns, so I'm looking to split things up. One obvious thing for me to take out is a method that formats and sends an email, and split that into a separate object.
My controller currently handles the MFMailComposeViewControllerDelegate
protocol because, after an email is successfully sent, I have some additional work to do.
My question is, if the controller uses as separate object for emailing, and I give it a pointer back to the controller for use as the MFMailComposeViewController
mailComposeDelegate
, am I going to create a problem -- specifically retain cycle?
If so, what would be a better approach in this scenario? Would it be enough to set the property pointing back to the controller as weak?