Re: Master - Detail: How to get back?
Re: Master - Detail: How to get back?
- Subject: Re: Master - Detail: How to get back?
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Thu, 16 Apr 2015 22:47:53 +0700
> On 16 Apr 2015, at 21:42, Kyle Sluder <email@hidden> wrote:
>
> On Apr 15, 2015, at 10:49 PM, Gerriet M. Denkmann <email@hidden> wrote:
>>
>>
>>
>>
>> 3. Run
>>
>> Run on iPhone:
>> Back Button is called "Master"
>>
>> Run on iPad:
>> Back Button is called "Master iPad"
>>
>> Strange, but not very important.
>
> Again, please file this as a separate Radar. (Are you sure it doesn’t say “Master…” on iPhone? That is, does it really say “Master iPhone” but it’s being truncated?)
iPhone uses the title of the Master Navigation Bar for the Back Button.
In the Master iPhone Scene I changed the title of the Navigation Bar to “Monster”, and now the iPhone Back Button looks like “< Monster”.
>
>>
>>
>> 4. Unwinding
>>
>> Added in MasterViewController:
>>
>> - (IBAction)doSomethingAndBackToMaster:(UIStoryboardSegue*)segue
>> {
>> DetailViewController *detailViewController = segue.sourceViewController;
>> NSLog(@"%s did something with \"%@\", will do: [%@ perform]",__FUNCTION__,
>> detailViewController.detailItem, segue);
>> [ segue perform ];
>
>
> You should not be sending -perform yourself. The segue runtime sends -perform to the unwind segue itself. You are given a pointer to the segue object so that you can inspect its source and destination view controllers and its identifier, so you may choose what work you need to perform in your unwind method.
Following your suggestion, I have removed the “[segue perform]” line.
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden