GlassBarItemBackground enum

How an item's glass background is drawn.

Mirrors the two booleans iOS 26 added to UIBarButtonItem: sharesBackground (default YES) and hidesSharedBackground (default NO). Their four combinations describe three distinct results, which are the first three values here; own is none for content that is itself glass.

Both are documented as being ignored for an item inside an explicit group of more than one; the equivalent here is that GlassBarItemBackground.shared is the only value that lets an item join its neighbours.

Inheritance
Available extensions

Values

shared → const GlassBarItemBackground

The item joins one glass capsule with its neighbours.

sharesBackground = YES — the default, and the only value that groups.

separate → const GlassBarItemBackground

The item gets a glass capsule of its own, sharing with nothing.

sharesBackground = NO. A lone icon in its own capsule is the circular button iOS 26 draws for a single bar item.

none → const GlassBarItemBackground

No glass is drawn behind the item at all.

hidesSharedBackground = YES. For content that carries its own shape — a profile photo, a coloured badge — where a capsule behind it would read as a second, competing surface.

own → const GlassBarItemBackground

The item's content is itself a glass surface.

hidesSharedBackground = YES, as none — but the pinned chrome fades and blurs ordinary content under opacity and image-filter layers, and a glass surface painted under either has no backdrop to sample. An own item dissolves through its surface's own visibility instead, the channel GlassMaterialize uses. Two such items matched across a route change take turns rather than cross-fading, since each would sample the other. For a capsule built from GlassButton.custom; plain content stays none.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<GlassBarItemBackground>
A constant List of the values in this enum, in order of their declaration.