Search
Rich's Mad Rants
Powered by Squarespace

Creating iOS 5 Apps Discussion > Page 28 - clarification on the Note

The Note states that the delegate outlet was also connected to the HWMainViewController in the storyboard.

Please correct me if I am wrong, but the delegate is actually only set in the storyboard, not anywhere in code.

In MainViewController we start out by declaring that it will adopt the HWFlipsideViewControllerDelegate protocol, and then implement the HWFlipsideViewControllerDelegate protocol's one method, flipsideViewControllerDidFinish:.

In FlipsideViewController, we declare the HWFlipsideViewControllerDelegate protocol and then declare a delegate property that requires that protocol, which is set to the MainViewController in the storyboard, not anywhere in code. Then we declare and implement the done: method, which will call flipsideViewControllerDidFinish: on the delegate (i.e., the MainViewController).

December 21, 2011 | Unregistered CommenterScott

Oops, never mind...


if ([[segue identifier] isEqualToString:@"showAlternate"]) {
[[segue destinationViewController] setDelegate:self];
}

December 21, 2011 | Unregistered CommenterScott

Sorry I didn't reply earlier. Apparently I'm not getting notifications when people post to the forums. I'll have to fix that. I'm glad you were able to solve it yourself.

December 23, 2011 | Unregistered CommenterRich