Re: Swapping views in print panel
Re: Swapping views in print panel
- Subject: Re: Swapping views in print panel
- From: Steve Mills <email@hidden>
- Date: Mon, 23 Mar 2015 11:04:30 -0500
On Mar 23, 2015, at 01:58:57, Graham Cox <email@hidden> wrote:
>
> Thinking about this, it's not that clear why you even need a special view for the print panel. You need a view to generate the print content, but that's not quite the same thing. When you create a print job, you pass it a view, which is called automatically (drawRect, etc) and the print job captures what it draws as PDF code that the print panel will display. Your view might need to help the print job out by detecting that it is being called by a print job, and tweaking its content to suit, but mostly it is independent of whether it also lives in a view hierarchy or not - typically it does.
The view doesn't need to be in a view hierarchy. Temp views for printing are common - even Apple apps do this, like TextEdit and Sketch.
> Of course, if you put the control to select list/icon view in the Print Panel, you are going to have to work hard. Alternatively, you could make that something the user chooses in the interface they display, and then just have a Print command on that interface. It prints in whatever form the user has already chosen. I would suggest that this is the usual way to handle that, most apps I've ever seen do it, even the Finder, when it used to support Print (Mac OS 9 and earlier), so users expect it. To be honest adding usable controls to the Print Panel is a royal PITA, you might want to simply avoid it.
I also started off that way, but I thought it'd be a nice touch if the user didn't have to go back to the doc window to change how it prints. Making the user do less work is always better.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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