Re: Cocoa equivalent to HIViewGetOptimalBounds?
Re: Cocoa equivalent to HIViewGetOptimalBounds?
- Subject: Re: Cocoa equivalent to HIViewGetOptimalBounds?
- From: Jo Meder <email@hidden>
- Date: Wed, 20 Jan 2010 14:44:50 +1300
Hi Kyle,
On 20/01/2010, at 5:34 AM, Kyle Sluder wrote:
> On Jan 18, 2010, at 6:48 PM, Jo Meder <email@hidden> wrote:
>
>> Is there a Cocoa equivalent to HIViewGetOptimalBounds()? That function would return the optimal bounds for an HIView and I found it very useful.
>
> Not entirely. -sizeToFit and other NSCell methods will get you bounds information, but not baseline info.
That sounds useful, I'll check it out, thanks.
> In most cases you should not be algorithmically generating your UI anyway. Is there a reason you can't just set up your control in IB?
Yes, because the UI is algorithmically generated :-). Well, a large portion of it anyway. Here's an example:
http://www.jomeder.com/rendernode.jpg
Most of the functionality from our application comes from what are basically plugins and they describe parameters in a way that we can generate a UI from that description. It's not perfect but it's slowly progressing towards something I might lay out manually. It has been more awful in the past. We try to size and lay out controls appropriately on Mac and Windows.
Regards,
Jo Meder
_______________________________________________
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