30 Commits
Author SHA1 Message Date
Samuel Hsiung e4ca0e3ccf make ASEditableTextNode's textView clip to bounds 2015-12-11 18:53:10 -08:00
Levi McCallum a0c05ebffc Rename CK classes to AS classes 2015-11-30 06:44:53 -08:00
Samuel Hsiung e4d2551384 Make textContainerInset configurable for ASEditableTextNode placeholder and typed textViews
Previously, it was only possible to configure the textContainerInset of the typed textView by accessing the textView property on didLoad. This would cause the placeholder and typed textViews to become desynced however, so in this commit we add the ability to configure both.
2015-10-31 16:37:04 -07:00
Adlai Holler 87caed27e2 Add more deep compares when setting public properties to the same value 2015-10-05 23:48:48 -07:00
rcancro 52091eb589 Placeholder bug in ASEditableTextNode
When setting a default placeholder and an attributedString before `_textKitComponents.textView` was created, the placeholder and the string were both appearing in the text node.

`_updateDisplayingPlaceholder` is called in `setAttributedString`, but since  `_textKitComponents.textView` is nil the placeholder was not hidden. Calling `_updateDisplayingPlaceholder` after `_textKitComponents.textView` loads fixes this.
2015-09-23 16:11:46 -07:00
Adlai Holler 20c74229a9 Updates from PR 2015-09-22 13:16:59 -07:00
Adlai Holler e9f463da73 Use the right name 2015-09-21 00:16:02 -07:00
Adlai Holler a1ffa499cb Assert against the user trying to set isLayerBacked on ASEditableTextNode 2015-09-21 00:15:03 -07:00
Adlai Holler efe198e814 Use ceilSize in ASEditableTextNode 2015-09-20 21:18:06 -07:00
rcancro 2f3562fa09 scott's comments 2015-09-15 09:11:19 -07:00
rcancro 01be5acece added a callback for initWithViewBlock/initWithLayerBlock 2015-09-14 20:36:08 -07:00
appleguy 16ed66c3a1 Merge pull request #550 from marmelroy/issue-549
Access to underlying UITextView for more configuration options.
2015-07-30 22:04:30 -07:00
Connor Montgomery ca5e9e7dc3 Add support for configuring on ASEditableTextNode. 2015-07-30 15:19:00 -04:00
Roy Marmelstein 6b38000941 A simpler, cleaner implementation 2015-07-22 11:05:27 +02:00
Roy Marmelstein 3c71289927 lazy creation of textview in accessor after assert 2015-07-18 16:31:13 +02:00
Roy Marmelstein 6b970e0e4a Display node assert 2015-07-18 16:29:25 +02:00
Roy Marmelstein 36b92205ed Brace style 2015-07-18 16:10:32 +02:00
Roy Marmelstein fd3eb94fcb Add main thread warnings and setter/getter assert 2015-07-12 21:35:42 +02:00
Roy Marmelstein 95016021b4 Access to underlying UITextView for more configuration options. 2015-07-09 16:09:20 +02:00
Huy Nguyen 9678adaa93 Merge branch 'master' into layout_node 2015-07-06 22:21:32 +07:00
Huy Nguyen af64f33ed7 Minor changes: remove unncessary imports and add a new line ad the end of ASInternalHelpers.h 2015-07-01 18:36:36 +07:00
Huy Nguyen 2149d44990 Fix naming convetion:
- "Layout node" is changed to "layout spec".
- Update tests.
- Update Kittens sample.
2015-07-01 18:13:44 +07:00
Huy Nguyen dd29a890df Still support -calculateLayoutThatFits: (and manual layout), for backward compatibility. 2015-06-28 20:31:32 +07:00
Jack Flintermann 8a200078bd make ASEditableTextField properly subclass responder methods 2015-06-27 03:19:51 -04:00
Huy Nguyen f588bceb4d Introduce ASLayoutable and eliminate ASCompositeNode:
- Both ASDisplayNode and ASLayoutNode conforms to this protocol.
- ASDisplayNode can be embeded directly into layout graph.
- Eliminate ASCompositeNode.
- Fix ASStaticSizeDisplayNode not recpect min constrained size.
- Updated tests.
2015-06-26 09:29:16 +07:00
Huy Nguyen abe98d5b09 Integrate new layout nodes to the framework.
- Introduce ASLayoutNode and its subclasses.
- ASDisplayNode measures its ASLayoutNode and cache the result (ASLayout). Calculated size and position of each subnode can be retrieved from the calculated layout.
- Custom nodes need to override -layoutNodeThatFits:(CGSize) instead of -calculateSizeThatFits:(CGSize).
- Custom nodes do not need to layout its subnodes (in -layout:) anymore. ASDisplayNode can handle the job most of the time, by walking through its layout tree.
- ASCompositeNode is used to embed (display) subnodes to a node's layout. That way, each subnode will also be measured while the parent node is measuring. And the parent node knows where its subnodes are within its layout.
2015-06-25 11:34:35 +07:00
Ryan Nystrom b6715b5cf9 Forward touches to super instead of the superview
fixes #402
2015-03-26 21:11:13 -07:00
Nadine Salter e0f926c861 Switch ASTextKitComponents interface C -> ObjC. 2015-01-25 16:27:01 -08:00
Nadine Salter 35d7f43fb6 Convert ASTextKitComponents to an object.
ARC doesn't play nicely with structs that contain references to
Objective-C objects, which causes breakage when using AsyncDisplayKit as
a dynamic framework (e.g., with CocoaPods 0.36+).  Fixes #198.
2015-01-25 15:50:54 -08:00
Nadine Salter 795b297c38 ASEditableTextNode. 2015-01-23 15:02:16 -08:00