Seemingly innocuous contents passed to tabViewBottomAccessory
can trigger inscrutable AttributeGraph cycles, which can then cause unexplained broken behavior of views that may be participating in these cycles.
These cycles can be introduced by adding common elements to the tabViewBottomAccessory
view hierarchy, like Slider, Button, Toggle, and even things simple if
statements surrounding Text elements. These cycles can even also be triggered in a manner that causes the tabViewBottomAccessoryPlacement
Environment value to be nil, which can then cause views that depend on this value to render incorrectly or not at all.
The errors logged to the Xcode console are of the form:
=== AttributeGraph: cycle detected through attribute 29528 ===
=== AttributeGraph: cycle detected through attribute 324264 ===
No further information about this attribute is available in any public Xcode tools.
Environment
- XCode Version 26.0 (17A324)
- iOS 26.0 (23A343)
Steps to reproduce
- Run the sample above in Simulator
- Observe no AttributeGraph cycles in Xcode console.
- Uncomment any of the commented out examples in SliderView.body
- Observe Xcode console for AttributeGraph cycle messages.
- Observe glitchy animation behavior
Expected Behavior
- No AttributeGraph cycle diagnostics for ordinary state changes.
- tabViewBottomAccessoryPlacement always present (non-nil) while accessory is attached.
- Dependent views update consistently.
- Errors logged to the Console would help guide me towards a resolution
Impact
- Undermines confidence in adopting tabViewBottomAccessory.
- Hard to debug: cycle traces are opaque and environment silently degrades (becomes nil) instead of asserting.
- Nearly shipped a UI where accessory layout fails sporadically.
What would help
- Underlying fix to prevent cycles for ordinary accessory content mutations.
- Guarantee (or documented contract) that tabViewBottomAccessoryPlacement is never nil while accessory is active, or an assert if invariants break.
- Option to enable detailed environment propagation trace when a cycle is detected.
- Symbolic source identifiers in cycle backtraces.
- Documentation note on current limitations (if certain view types are not yet supported in accessory regions).