My application has a dynamic segmented control, where the user can
specify that each segment has an icon, text, or both. However I am
having trouble correctly resizing a segment.
According to the docs, calling
- (void)setWidth:(CGFloat)width forSegment:(NSInteger)segment
with 0 for the width " Specify the value 0 if you want the segment to
be sized to fit the available space automatically."
Unfortunately this only seems to work if the segment is text only. If
the segment has an icon, or an icon + text then resizing doesn't work,
as any segment with an icon doesn't include space for the icon. As a
work around I have tried setting the width to 0 and then immediately
getting the width ( with the intention of adding say 25 for the icon)
but it also returns 0.
Does anyone know what might be going on and a workaround if necessary?
Thanks!
Peter
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com