Re: advice for creating these controls
Re: advice for creating these controls
- Subject: Re: advice for creating these controls
- From: Alex Zavatone <email@hidden>
- Date: Thu, 22 Mar 2012 11:22:19 -0400
On Mar 22, 2012, at 11:08 AM, Andreas Mayer wrote:
>
> Am 22.03.2012 um 15:14 schrieb Rick C.:
>
>> Just looking for an opinion what's the best way to create controls like this:
>>
>> http://cl.ly/191V3Z1C0m2k2U0V443x
>>
>> I initially assumed subclassing NSSegmentedControl, but then I was thinking maybe I can just subclass NSButton and put them together.
>
> The first one looks like two controls next to each other. A button and a popup menu. Some subclassing is probably needed to get the right look.
> The other two look like segmented controls, so it's probably best to subclass that. (Do you even need a subclass? Doesn't the "Textured Square" style do what you need?)
They are defined here:
https://developer.apple.com/library/ios/#samplecode/UICatalog/Introduction/Intro.html
In this file: SegmentViewController.m using UISegmentedControl like this:
#pragma mark UISegmentedControl
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:
[NSArray arrayWithObjects:
[UIImage imageNamed:@"segment_check.png"],
[UIImage imageNamed:@"segment_search.png"],
[UIImage imageNamed:@"segment_tools.png"],
nil]];
- Alex Zavatone
_______________________________________________
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