Contents

suggestedAge

The range of ages, measured in years, for which you deem a context’s content suitable.

Declaration

var suggestedAge: NSRange { get set }

Discussion

Use this property to optionally suggest an age range for a context’s content. This guides teachers as they look for content for their students, although teachers are free to ignore your suggestion. If you provide a range, use integer ages measured in years as bounds. For example, you could consider a game as suitable for students from ages 4 to 6:

gameContext.suggestedAge = NSRange(4...6) // For ages 4 to 6.

To indicate no lower bound, provide a value of 0. To indicate no upper bound, provide the largest possible value. Use both at the same time to indicate a context’s suitability for all ages:

youthContext.suggestedAge = NSRange(0...10) // Up to and including age 10.
adultContext.suggestedAge = NSRange(18...Int.max - 1) // Ages 18 and over.
allAgesContext.suggestedAge = NSRange(0...Int.max - 1) // For everyone.

New contexts that you create have the “all ages” setting by default.

See Also

Characterizing the context