• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS - Hide Master view in a split view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS - Hide Master view in a split view


  • Subject: Re: iOS - Hide Master view in a split view
  • From: WT <email@hidden>
  • Date: Thu, 24 Mar 2011 21:17:45 -0300

On Mar 24, 2011, at 8:18 PM, Eric Gorr wrote:

>> On Mar 24, 2011, at 7:11 PM, WT <email@hidden> wrote:
>>
>> I just ran a very quick test and the following code snippet successfully toggles between showing and hiding the master view:
>>
>> UIViewController* vc;
>> vc = [splitViewController.viewControllers objectAtIndex: 0];
>> vc.view.hidden = !vc.view.hidden;
>>
>> All you need to do then is adjust the frame of the detail view, which is the object at index 1 in the array splitViewController.viewControllers. Of course, you want to make sure that this code only runs when the device orientation is landscape and you'll want to cache the two frames the detail view will be having.
>
> I don't think it is so easy to adjust the frame of the detail view considering the above code fails. I did try this, and, you're right, the master view will hide, but the detail view will not resize.

Hmm... could it be that the detail view has the autoresize masks set in a way to prevent it from expanding to the left? The solution might be as simple as just (re)setting them appropriately in which case you don't need any setFrame: code at all and hiding/showing the master view would suffice. I can't try that right now but, if you do, please share the outcome._______________________________________________

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

References: 
 >iOS - Hide Master view in a split view (From: Eric Gorr <email@hidden>)
 >Re: iOS - Hide Master view in a split view (From: WT <email@hidden>)
 >Re: iOS - Hide Master view in a split view (From: Eric Gorr <email@hidden>)

  • Prev by Date: Re: iOS - Hide Master view in a split view
  • Next by Date: Mutable and immutable class cluster implementation / "method swizzling" question
  • Previous by thread: Re: iOS - Hide Master view in a split view
  • Next by thread: Re: iOS - Hide Master view in a split view
  • Index(es):
    • Date
    • Thread