• 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
Hiding children of view with height == 0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hiding children of view with height == 0


  • Subject: Hiding children of view with height == 0
  • From: Ross Carter <email@hidden>
  • Date: Tue, 24 Nov 2009 12:44:29 -0500

Thanks, Patty and Mike, for quickly answering my question about NSSegmentedControl.

I have some NSView subclasses that are hidden from view by setting their height to 0. I use this rather than setHidden:NO because the height is set by an animation, which makes the views look like they are rolling up.

It looks like AX subviews of hidden views, but not views that have 0 height or views that are not visible on screen because they are clipped. In those situations, I am doing this in the view subclass:

- (id)accessibilityAttributeValue:(NSString *)attribute {
	if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
		if ([self frame].size.height < 1.0) {
			return nil;
		}
	}
	return [super accessibilityAttributeValue:attribute];
}

Is that the correct approach?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Hiding children of view with height == 0
      • From: James Dempsey <email@hidden>
    • Re: Hiding children of view with height == 0
      • From: Christiaan Hofman <email@hidden>
  • Prev by Date: Re: NSSegmentedControl
  • Next by Date: Re: Hiding children of view with height == 0
  • Previous by thread: Re: NSSegmentedControl
  • Next by thread: Re: Hiding children of view with height == 0
  • Index(es):
    • Date
    • Thread