Re: How to remove iPad popover?

2015-04-15 Thread Kyle Sluder
On Wed, Apr 15, 2015, at 12:00 AM, Kyle Sluder wrote:
> Segues are transient objects that only exist

Er, I meant "that only exist long enough to perform their action". In
other words, if you perform a popover segue, that UIStoryboardSegue
object ceases to exist once the popover is onscreen.

--Kyle Sluder
___

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

Re: How to remove iPad popover?

2015-04-15 Thread Gerriet M. Denkmann

> 
> 
> On Tue, Apr 14, 2015, at 11:49 PM, Gerriet M. Denkmann wrote:
>> And if there is any way (easy or not) to get this (in a non-deprecated
>> way), I would be very interested to hear about it.
> 
> There is not. Please file a Radar.

I filed two:

20549495 Unable to get popover controller.
20549450 updateSearchResultsForSearchController: does NOT get called when the 
scope changes.


> 
> --Kyle Sluder


___

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

Re: How to remove iPad popover?

2015-04-14 Thread Kyle Sluder
On Tue, Apr 14, 2015, at 11:49 PM, Gerriet M. Denkmann wrote:
> And if there is any way (easy or not) to get this (in a non-deprecated
> way), I would be very interested to hear about it.

There is not. Please file a Radar.

> 
> By the way: UIStoryboardPopoverSegue has a popoverController property.
> But then: how to get the UIStoryboardPopoverSegue ?

Segues are transient objects that only exist, and there is no reason to
suspect that UISplitViewController uses them to present the popover.

--Kyle Sluder
___

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

Re: How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann

> On 15 Apr 2015, at 09:32, Dave Fernandes  wrote:
> 
> You can dismiss the master popover using -[UIPopoverController 
> dismissPopoverAnimated:]
> 
> However, getting the popover controller in the first place is a bit of a 
> pain. The only way I know is to provide a UISplitViewControllerDelegate 
> object to the UISplitViewController (I instantiate one in the storyboard); 
> and then in 
> splitViewController:willHideViewController:withBarButtonItem:forPopoverController:,
>  record the popover controller in a property, which you can use later.

This sounds like a good idea; only: this method is deprecated since 8.0.
The suggestion is: “Implement the splitViewController:willChangeToDisplayMode: 
method instead.”
Sadly this replacement does not mention the popover controller.

> You can also use this popover controller to programmatically show the popover 
> when you need to.
> 
> If there is an easier way, I would love to hear about it.

And if there is any way (easy or not) to get this (in a non-deprecated way), I 
would be very interested to hear about it.

By the way: UIStoryboardPopoverSegue has a popoverController property.
But then: how to get the UIStoryboardPopoverSegue ?


Kind regards,

Gerriet.


> 
> Cheers,
> Dave
> 
>> On Apr 14, 2015, at 10:13 PM, Gerriet M. Denkmann  
>> wrote:
>> 
>> 
>>> On 15 Apr 2015, at 08:59, Roland King  wrote:
>>> 
>>> 
 On 15 Apr 2015, at 09:49, Gerriet M. Denkmann  wrote:
 
 On iPad (portrait orientation) there is on the left a MasterView, 
 overlapping the DetailView.
 (i.e. splitViewController.displayMode = 
 UISplitViewControllerDisplayModePrimaryOverlay)
 
 When I tap on the DetailView, the MasterView slides away.
 (i.e. splitViewController.displayMode → 
 UISplitViewControllerDisplayModePrimaryHidden)
 
 How can I do this from code?
 
 The obvious way would be:
splitViewController.displayMode = 
 UISplitViewControllerDisplayModePrimaryHidden;
 but displayMode is readonly.
 
 iOS 8.3
 
 Gerriet.
 
 
>>> 
>>> Let’s see if the documentation contains any hints here .. documentation on 
>>> UISplitViewController’s displayMode ..
>>> 
>>> "To change the current display mode, change the value of the 
>>> preferredDisplayMode property.”
>>> 
>>> I’d probably try that
>> 
>> I read this as meaning “set the general behaviour”.
>> Indeed: when I set preferredDisplayMode = 
>> UISplitViewControllerDisplayModePrimaryHidden then the Primary stays hidden, 
>> even if I rotate the iPad to landscape.
>> This is NOT what I want.
>> 
>> I want: [ splitViewController 
>> hideThePrimaryViewExactlyAsWhenOneTappsOnTheSecondaryView ];
>> 
>> 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

Re: How to remove iPad popover?

2015-04-14 Thread Dave Fernandes
You can dismiss the master popover using -[UIPopoverController 
dismissPopoverAnimated:]

However, getting the popover controller in the first place is a bit of a pain. 
The only way I know is to provide a UISplitViewControllerDelegate object to the 
UISplitViewController (I instantiate one in the storyboard); and then in 
splitViewController:willHideViewController:withBarButtonItem:forPopoverController:,
 record the popover controller in a property, which you can use later.

You can also use this popover controller to programmatically show the popover 
when you need to.

If there is an easier way, I would love to hear about it.

Cheers,
Dave

> On Apr 14, 2015, at 10:13 PM, Gerriet M. Denkmann  
> wrote:
> 
> 
>> On 15 Apr 2015, at 08:59, Roland King  wrote:
>> 
>> 
>>> On 15 Apr 2015, at 09:49, Gerriet M. Denkmann  wrote:
>>> 
>>> On iPad (portrait orientation) there is on the left a MasterView, 
>>> overlapping the DetailView.
>>> (i.e. splitViewController.displayMode = 
>>> UISplitViewControllerDisplayModePrimaryOverlay)
>>> 
>>> When I tap on the DetailView, the MasterView slides away.
>>> (i.e. splitViewController.displayMode → 
>>> UISplitViewControllerDisplayModePrimaryHidden)
>>> 
>>> How can I do this from code?
>>> 
>>> The obvious way would be:
>>> splitViewController.displayMode = 
>>> UISplitViewControllerDisplayModePrimaryHidden;
>>> but displayMode is readonly.
>>> 
>>> iOS 8.3
>>> 
>>> Gerriet.
>>> 
>>> 
>> 
>> Let’s see if the documentation contains any hints here .. documentation on 
>> UISplitViewController’s displayMode ..
>> 
>> "To change the current display mode, change the value of the 
>> preferredDisplayMode property.”
>> 
>> I’d probably try that
> 
> I read this as meaning “set the general behaviour”.
> Indeed: when I set preferredDisplayMode = 
> UISplitViewControllerDisplayModePrimaryHidden then the Primary stays hidden, 
> even if I rotate the iPad to landscape.
> This is NOT what I want.
> 
> I want: [ splitViewController 
> hideThePrimaryViewExactlyAsWhenOneTappsOnTheSecondaryView ];
> 
> 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/dave.fernandes%40utoronto.ca
> 
> This email sent to dave.fernan...@utoronto.ca


___

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

Re: How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann

> On 15 Apr 2015, at 08:59, Roland King  wrote:
> 
> 
>> On 15 Apr 2015, at 09:49, Gerriet M. Denkmann  wrote:
>> 
>> On iPad (portrait orientation) there is on the left a MasterView, 
>> overlapping the DetailView.
>> (i.e. splitViewController.displayMode = 
>> UISplitViewControllerDisplayModePrimaryOverlay)
>> 
>> When I tap on the DetailView, the MasterView slides away.
>> (i.e. splitViewController.displayMode → 
>> UISplitViewControllerDisplayModePrimaryHidden)
>> 
>> How can I do this from code?
>> 
>> The obvious way would be:
>>  splitViewController.displayMode = 
>> UISplitViewControllerDisplayModePrimaryHidden;
>> but displayMode is readonly.
>> 
>> iOS 8.3
>> 
>> Gerriet.
>> 
>> 
> 
> Let’s see if the documentation contains any hints here .. documentation on 
> UISplitViewController’s displayMode ..
> 
> "To change the current display mode, change the value of the 
> preferredDisplayMode property.”
> 
> I’d probably try that

I read this as meaning “set the general behaviour”.
Indeed: when I set preferredDisplayMode = 
UISplitViewControllerDisplayModePrimaryHidden then the Primary stays hidden, 
even if I rotate the iPad to landscape.
This is NOT what I want.

I want: [ splitViewController 
hideThePrimaryViewExactlyAsWhenOneTappsOnTheSecondaryView ];

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

Re: How to remove iPad popover?

2015-04-14 Thread Roland King

> On 15 Apr 2015, at 09:49, Gerriet M. Denkmann  wrote:
> 
> On iPad (portrait orientation) there is on the left a MasterView, overlapping 
> the DetailView.
> (i.e. splitViewController.displayMode = 
> UISplitViewControllerDisplayModePrimaryOverlay)
> 
> When I tap on the DetailView, the MasterView slides away.
> (i.e. splitViewController.displayMode → 
> UISplitViewControllerDisplayModePrimaryHidden)
> 
> How can I do this from code?
> 
> The obvious way would be:
>   splitViewController.displayMode = 
> UISplitViewControllerDisplayModePrimaryHidden;
> but displayMode is readonly.
> 
> iOS 8.3
> 
> Gerriet.
> 
> 

Let’s see if the documentation contains any hints here .. documentation on 
UISplitViewController’s displayMode ..

"To change the current display mode, change the value of the 
preferredDisplayMode property.”

I’d probably try that

___

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