> On 15 Apr 2015, at 14:51, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> On Apr 14, 2015, at 23:47 , Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote:
>> 
>> Using the Xcode template: iOS - Master-Detail, the Detail view has (in the 
>> top left corner) a Back-Button, which works fine.
>> 
>> Now I added another UIBarButtonItem called: “Do something and go back” 
>> connected to some IBAction in DetailViewController.
>> 
>> But how to make it go back to the MasterView? 
>> 
>> Found some mention of the red Exit symbol. But cannot persuade Xcode to 
>> create an Unwind segue to Master.
>> Tried to Control-Drag from the yellow Detail thing to the red Exit below, 
>> but no effect.
>> 
>> What am I missing?
> 
> https://developer.apple.com/library/ios/technotes/tn2298/_index.html
> 
> The key to this is that the unwind action method must have exactly the 
> parameter type shown. Anything else prevents IB from connecting the Exit 
> button to the  target.

In DetailViewController I added:

- (IBAction)unwindToMainMenu:(UIStoryboardSegue*)sender
{
        UIViewController *sourceViewController = sender.sourceViewController;
        NSLog(@"%s %@ id %@",__FUNCTION__, sourceViewController, 
sender.identifier);
        [ sender perform ];
}

Now I can control-drag from by UIBarButtonItem to the red Exit symbol in the 
Detail Scene. A big step forward.
A new “Unwind segue to Scene Exit Placeholder” appeared. I gave it an 
identifier.


Build, run, click on my button: nothing happens.

I added:

- (IBAction)dummyExit: sender;  
{
        (void)sender;
        NSLog(@"%s %@ ",__FUNCTION__, sender);
}

and control-dragged from my button to the yellow Detail thing.

Build, run, click on my button: nothing happens.
Nothing means: no NSLog, no anything.

What else am I missing?


Kind regards,

Gerriet.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to