86 Commits

Author SHA1 Message Date
Adlai Holler
61dade6bda Raise deployment target to iOS 9 (#743)
https://github.com/TextureGroup/Texture/pull/743

Manually merged since I forgot to retarget that diff onto master before merge
2018-01-15 15:13:05 -08:00
Adlai Holler
d4725a51f2 Add Experimental Text Node Implementation (#259)
* Add experimental text node implementation, based on YYText

* Fix warnings and alert when unimplemented experimental features are used.

* Address feedback from review

* Extend the cthulog

* Update license headers
2017-05-14 12:02:07 -07:00
Garrett Moon
3522c81d5e Update examples 2017-04-14 09:37:38 -07:00
Adlai Holler
404795dc02 Remove Support for iOS 7 (#2930)
* Drop support for iOS 7

* Copy reference images

* Update deployment for sample projects

* Update version

* Update "Life Without Cocoapods"
2017-02-01 14:40:37 -08:00
David Robles
2bc701d23f Copy ASTextNode’s implementation of placeholderImage into ASImageNode in order to fix the usage of placeholderColor. (#2866) 2017-01-05 14:59:11 -08:00
Michael Schneider
4f1d7ec064 Never access the view property of the node in init 2016-11-23 15:50:26 -08:00
Hannah Troisi
0b7dfcc54d [Examples] 2.0 Collection/Table API updates (#2390)
* update VerticalWithinHorizontal example

* update SocialAppLayout

* update Kittens

* update HorizontalWithinVerticalScrolling

* update AsyncDisplayKitOverview

* update CustomCollectionView

* CatDealsCollectionView

* update Swift

* address @appleguy's comment

* updates for tableNode deselectRowAtIndexPath
2016-10-24 17:14:28 -07:00
Hannah Troisi
3c995d8d12 [Examples] Layout 2.0 updates (#2382)
[Examples] Layout 2.0 updates: Switch YES to 1.0 for flexGrow and flexShrink
2016-10-15 17:30:48 -07:00
Michael Schneider
d6e5e27c39 [Layout] Add helper properties for setting sizes via CGSize and ASRelativeSize (#2324)
* Remove set layout style size helper

* Update API to set and get a CGSize / ASRelativeSize from an ASLayoutElementStyle

- Expose ASRelativeSize type
- Add new helper properties to set a size / relative size to ASLayoutElementStyle
- Don't expose the size in ASLayoutElementStyle anymore and move into ASLayoutElementStylePrivate

* Update examples

* Update comments for size helpers
2016-10-04 12:35:45 -04:00
Garrett Moon
5205ef6840 [API] Remove old deprecated methods. (#2312)
* Remove old deprecated methods. Will restore ones that were removed recently based on PR.

* Update example to use non-deprecated method.

* Don't remove locking / unlocking, insets or willDisplayNode deprecated methods yet.
2016-10-03 14:57:01 -04:00
Hannah Troisi
b18e1bc071 Fix example projects to use Layout API 2.0 style object (#2285)
* fix examples/ASDKLayoutTransition

* fix examples/ASMapNode to use new Layout API 2.0

* fix examples/SocialAppLayout to use Layout API 2.0

* fix CatDealsCollectionView to use Layout API 2.0

* fix examples/AsyncDisplayKitOverview to use Layout API 2.0

* Kittens Layout API 2.0 fixes

* HorizontalWithinVerticalScrolling

* VerticalWithinHorizontalScrolling

* ASDKTube

* fix ASViewController

* fix layout

* fix layout

* fix size
2016-09-23 16:24:21 -07:00
Michael Schneider
8897614f0e [Layout] Layout API based on content area (#2110)
* Initial commit for adding a size constraint to ASLayoutable's

* Some more commits

* Fix sample projects in extra/

* Remove preferredFrameSize test of ASEditableTextNode

* Remove preferredFrameSize from examples_extra

* Add deprecation warning to -[ASDisplayNode preferredFrameSize]

* Add deprecation warning to -[ASDisplayNode measureWithSizeRange:]

* Commit

* Commit

* Remove ASRelativeSizeRange

* Make ASRelativeSize private

* Adjust examples

* Improve setting of -[ASLayoutable size] with points or fractions

* Add ASWrapperLayoutSpec

* Improve creation of ASRelativeDimension

* Add `preferredFrameSize` back and add deprecated logging

* Add `layoutSpecBlock` setter and getter and add locking for it

* Add better documentation and fix macros to create ASRelativeDimension

* Create new ASSizeRangeMake with just a CGSize as parameter

* Update Kitten and Social App Layout example

* Add layoutThatFits: and deprecate measure:

* Rename ASRelativeDimension to ASDimension

* Fix examples for ASDimension renaming

* Remove fancy height and width setter

* Fix ASDimension helper

* Rename -[ASLayout layoutableObject] to -[ASLayout layoutable]

* Update layout related methods and more clearer documentation around how to use it

* Deprecate old ASLayout class constructors

* Don't unnecessary recalculate layout if constrained or parent size did not change

* Use shared pointer for ASDisplayNodeLayout

* Fix rebase conflicts

* Add documentation and move implementation in mm file of ASDisplayNodeLayout

* Fix test errors

* Rename ASSize to ASLayoutableSize

* Address comments

* Rename setSizeFromCGSize to setSizeWithCGSize

* Improve inline functions in ASDimension

* Fix rebase conflicts
2016-09-07 08:44:48 -07:00
Adlai Holler
5e3627a9cd [ASTextNode] Actually deprecate attributedString property (#2151) 2016-09-01 16:43:03 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
Scott Goodson
b99910a149 [Examples, Build] Fix project configuration of two example apps that were incompatible with modern Cocoapods. 2016-04-22 23:04:12 -07:00
Scott Goodson
15a4e18844 [Examples] Officially add tvOS to podspec, ensure Podfiles correctly show minimum supported version 7.0 instead of 7.1 2016-04-22 20:29:52 -07:00
Michael Schneider
563e52bb6a Fix Podfile is missing target for samples 2016-04-21 11:07:08 -07:00
Michael Schneider
9291372c7f Show status bar in examples 2016-03-02 06:53:55 -08:00
Adlai Holler
8f10d8ea99 More progress with the Swift example 2016-02-01 12:10:38 -08:00
rcancro
7f6f2fed11 Added ASTextNodeWordKerner support to ASTextNode
* Added a member to `ASTextKitAttributes` that is an optional delegate to the struct's NSLayoutManager.
* Changed ASTextNode to set this delegate to an instance of ASTextNodeWordKerner.
* Updated init method of `ASTextKitContext` to take an optional NSLayoutManager delegate
* Added the files in TextKit folder to the public headers (so we can include ASTextNodeTypes.h)
2016-01-28 08:38:22 -08:00
Luke Parham
579313f086 Merge branch 'master' into ASVideoNode 2016-01-13 12:22:55 -06:00
Scott Goodson
25b6f29584 Introduce ASCollectionInternal file and create always-available ASCView -> ASCNode backpointer. 2016-01-01 23:36:00 -08:00
Luke Parham
5fbf39644b merged upstream 2015-12-26 01:33:34 -06:00
Luke Parham
a75871055f added video sample app with tableview and simple one with 3 video examples 2015-12-18 02:22:33 -06:00
Adlai Holler
7079a9cc79 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode+Subclasses.h
2015-12-13 10:05:03 -08:00
Scott Goodson
a47a1b8c2a Bump podspec to 1.9.3. Remove Cocoapods-generated workspace files. 2015-12-06 20:32:21 -08:00
Adlai Holler
fdfe18873a Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNodeExtras.h
	AsyncDisplayKit/Details/ASTextNodeRenderer.h
	AsyncDisplayKit/Details/ASTextNodeShadower.h
2015-12-01 16:45:25 -08:00
Adlai Holler
762be97a51 Merge branch 'master' into update-objc 2015-11-13 12:03:30 -08:00
Levi McCallum
2d93192b9f Fix selection behavior of ASTableView cells 2015-11-11 01:06:28 -08:00
Adlai Holler
802011ef97 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode.h
2015-11-08 18:19:06 -08:00
Huy Nguyen
9e4c274a5b Animate relayout in Kittens example 2015-11-04 16:53:36 +02:00
appleguy
0598935957 Merge pull request #793 from nguyenhuy/ImproveCellNodeRelayout
ASCellNode delegate to automatically resize in table & collection when -setNeedsLayout called.
2015-11-01 11:11:32 -08:00
Scott Goodson
3175ce2fe7 Fix retain cycle in basic, cache-less ASNetworkImageNodes
This should not directly affect more complex apps that don't use the ASBasicImageDownloader.

Also disables the default-on text placeholders, as they churn memory during the measurement pass.
These were intended to be written with pure layers (without using backing stores), so I don't
think it is a reasonable default-on behavior until that is fixed.
2015-10-30 22:42:05 -07:00
Huy Nguyen
fb18e7635b Notify ASCellNodeDelegate even if a relayout doesn't result in a resize
If the delegate is an ASTableView, relayoutAnimation will still be considered for animation.
2015-10-29 21:27:29 +02:00
Huy Nguyen
00400e166f Introduce ASCellNodeDelegate
- Cell node automatically notifies the delegate after a relayout (via -setNeedsLayout) that results in a new size. Confirming to ASCellNodeDelegate; ASTableView and ASCollectionView reload the calling cell upon notifications. These views automatically set themselves as delegate of every node.
- The result is that ASCellNode subclasses don't need to manually notify the containing view. Thus, `-relayoutItemAtIndexPath` and `-relayoutRowAtIndexPath` are removed.
- Kittens example is updated to reflect the change.
2015-10-29 16:59:46 +02:00
Huy Nguyen
210a89e83c Animate subnodes swap in Kitten example. 2015-10-12 22:24:19 +03:00
Huy Nguyen
f13f61c2f0 Add relayout item/row APIs to ASTableView and ASCollectionView. 2015-10-07 21:25:07 +03:00
Scott Goodson
47be24037d Reduce _ASAsyncTransaction allocations by ensuring nodes without display methods don't create them. 2015-09-24 19:26:00 -07:00
Adlai Holler
b1dfaa1eff Update project indentation settings 2015-09-16 14:17:52 -07:00
rcancro
cbaf178950 Hide ASLayoutOptions from the user 2015-09-08 09:50:47 -07:00
rcancro
15b3fd6eab Moved ASLayoutable* properties into ASLayoutOptions class 2015-09-08 09:50:27 -07:00
rcancro
61b72d2c46 fix kittens example 2015-09-08 09:49:40 -07:00
appleguy
ecfacd0bd7 Merge pull request #621 from nguyenhuy/table_cell_node_min_width
New min constrained width for cell nodes in table view
2015-08-28 23:47:22 -07:00
rcancro
9bf62d14ab Merge remote-tracking branch 'upstream/master' into baseline
# Conflicts:
#	AsyncDisplayKit/Layout/ASLayoutSpec.h
#	AsyncDisplayKit/Layout/ASStackLayoutSpec.mm
2015-08-24 09:54:36 -07:00
rcancro
680305704a addressed comments and fixed tests 2015-08-21 21:03:40 -07:00
rcancro
c06a6be188 ASLayoutSpec are temporarily mutable and have a more obj-c interface 2015-08-21 16:02:36 -07:00
Huy Nguyen
641929c4e5 By default, cell nodes in table view should fill its width. So the min constrained width is updated to enforce this behaviour. 2015-08-21 17:43:40 +03:00
Huy Nguyen
7249661990 Improve relayout when constrained size of all nodes is changed:
- In -layoutSubviews of table and collection views, detect changes that cause a different constrained size for nodes, and trigger relayout immediately.
- Orientation change can be handled by this solution. So, no need to observe to its events.
- Update Kittens example to support iPad (easier to catch bugs on these devices) and add a title to navigation bar (looks a bit nicer).
2015-08-13 06:28:47 +03:00
appleguy
57291fa544 Merge pull request #590 from rcancro/master
Add expectedSize to ASNetworkImageNode
2015-08-12 15:51:57 -07:00
ricky cancro
b58e8344c0 Add expectedSize to ASNetworkImageNode
ASNetworkImageNode defers to ASImageNode to return its calculatedSize. ASImageNode returns the size of its image. There is a good chance that ASNetworkImageNode hasn't downloaded its image yet when calculatedSize is called, so it returns a size of CGSizeZero.

On top of that, it is possible that the size of the image is not actually the size that we wish to display in our node.

I've added an "expectedImageSize" property that can be used to determine the calculatedSize of an ASNetworkImageNode.
2015-08-09 16:34:44 -07:00