-2

I have a modal view controller that takes another UIViewController as delegate.

My doubt is about handling the delegate object in the modal view controller. Should I assign it or retain it in the modal view controller? Is there any convention to handle delegates in cocoa?

If I assign it, who will release the UIViewController and if I retain it, I have to release that reference in the ModalViewController.

Anand
  • 10,310
  • 24
  • 90
  • 135

1 Answers1

0

Delegates are typically assigned in Cocoa.

Check out this question, it's answered beautifully.

Community
  • 1
  • 1
Eytan
  • 1,825
  • 17
  • 24