mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-03-30 23:17:14 +08:00
814 B
Executable File
814 B
Executable File
title, layout, permalink, next
| title | layout | permalink | next |
|---|---|---|---|
| ASButtonNode | docs | /docs/button-node.html | text-node.html |
ASButtonNode (a subclass of ASControlNode) supports simple buttons, with multiple states for a text label and an image with a few different layout options. Enables layerBacking for subnodes to significantly lighten main thread impact relative to UIButton (though async preparation is the bigger win).
Features:
- supports state-changing background images
- supports state-changing titles
- supports text alignment
- supports contentEdgeInsets
- offers methods that allow more convenient usage than creating attributed strings — title NSString, UIFont, and UIColor.
Gotchas:
- the
selectedproperty logic should be handled by the developer. Tapping the ASButtonNode does not automatically enable selected.