2380 Commits

Author SHA1 Message Date
Adlai Holler
a0aad4609d [ASDataController] Temporarily disable some troublesome assertions 2016-07-08 11:36:43 -07:00
Adlai Holler
82233af5a7 Merge pull request #1860 from rcancro/upstream_remove_context
[ASTraitCollection] Remove traitCollectionContext from ASTraitCollection; add containerWindowSize
2016-07-08 11:18:04 -07:00
Michael Schneider
f25e0f0d01 Fix Xcode 8 errors 2016-07-08 10:51:07 -07:00
Adlai Holler
33620b9e8e Merge pull request #1834 from maicki/MSVisibilityTriggeringViewCreation
[ASVisibility] Don't change the range mode if the node was not loaded yet
2016-07-08 10:32:20 -07:00
Adlai Holler
9154fbbdda Merge pull request #1864 from nguyenhuy/range_controller
[ASRangeController] Minimize number of registrations to node display notifications
2016-07-08 10:15:16 -07:00
Huy Nguyen
312de1a084 Make sure range controller listens to node display notifications if absolutely needed 2016-07-08 12:09:47 +07:00
Adlai Holler
8e1c8acb54 Merge pull request #1861 from facebook/AHCollectionViewLayerRetaining
[ASCollectionView] Add strong Layer Pointer Under iOS < 9 to Workaround Crashes
2016-07-07 18:26:02 -07:00
Adlai Holler
332ab2330a Merge pull request #1858 from maicki/MSFixBlockDeclaration
[ASCollectionView] Add return type to the shouldNotAnimateBlock
2016-07-07 14:42:20 -07:00
Garrett Moon
b79641d4ee Use indexOfObjectIdenticalTo since we only care if the pointers are equal. Thanks @Adlai-Holler! 2016-07-07 11:13:18 -07:00
Garrett Moon
8081123cb2 Fix visibility assert on iOS 7
It appears that didMoveToViewController: can be called with nil,
yet self.parentViewController will *not* be nil. This can result
in calling parent view controller's visibility depth. Instead of
asserting, these methods should return NSNotFound which also happens
to be a really large number, effectively infinite depth.
2016-07-07 11:08:06 -07:00
ricky
ff0e2846e3 fixed formatting 2016-07-07 10:56:58 -07:00
ricky
7314a18ab4 rename containerWindowSize to containerSize 2016-07-07 10:55:18 -07:00
Adlai Holler
54ee62f002 [ASCollectionView] Add a strong pointer from ASCollectionView -> layer under iOS < 9 to workaround issue 2016-07-07 10:36:41 -07:00
ricky
3512cf47aa assert we are on the main thread before accessing view. 2016-07-07 10:21:40 -07:00
ricky
ec4b666bc5 update ASTraitCollection header 2016-07-07 09:59:24 -07:00
ricky
637c4f3a9f [ASTraitCollection] Remove traitCollectionContext from ASTraitCollection; add containerWindowSize
Passing around a pointer was leading to crashes as the ASVC was the sole owner of the context. There are cases where the VC would dealloc while its subnodes were laying out. This could lead to the subnodes accessing a garbage pointer.
2016-07-07 09:23:37 -07:00
Michael Schneider
94ca363936 Add return type to the shouldNotAnimateBlock 2016-07-07 07:00:07 -07:00
Kiel Gillard
6a15ab6130 * Tidy the header imports, forward declaring classes and protocols where appropriate to avoid import cycles and using the framework/system header notation for imports occuring in .h files.
* Perhaps controversially, decomposing ASRangeControllerUpdateRangeProtocol+Beta.h such that the categories on various classes are defined in the classes themselves since that's where the implementation of those categories is provided.
* Updating unit tests and import other headers the tests took for granted. The tests could probably import the umbrella header and not have to worry about this.
* Updating the "Life without Cocoapods" sample to build and run dependent on ASDK as a static library.
* Added a "Life With Frameworks" sample app to build and run dependent on ASDK as a framework, proving the framework targets work.
2016-07-07 15:12:19 +10:00
Adlai Holler
c62a4d3e79 [ASCollectionView] Greatly Improve Cell Node Resizing (#1853)
* [ASCollectionView] Initial pass at reducing double-sided animations

* [ASCollectionView] Always suppress animation during node size requery

* [ASCollectionView] Rejigger the invalidation logic to support animated size changes

* [ASCollectionView] Remove unused header

* [ASCollectionView] Change comment

* [ASDataController] Remove unused variable

* [ASCollectionView] When relayout animated due to cell size change, wait until next layout pass

* [ASCollectionView] Invalidate layout synchronously

* [ASCollectionView] Only read the layout object once

* [ASCollectionView] When size changes, wait for requery before layout

* [ASCollectionView] Sort of go back to using an empty update to handle node resizing

* [ASCollectionView] Remove unused constant

* [ASCollectionView] Address PR comments

* [ASCollectionView] Prevent nested [super performBatchUpdates:] calls
2016-07-06 14:13:52 -07:00
Kiel Gillard
f7b7bcebeb * Make the "Life Without Cocoapods" sample build and run.
* Properly reference headers within implementation files to avoid import cycles and redeclaration warnings.
2016-07-06 16:58:13 +10:00
Hannah Trosi
f6d30b668d add comments to deprecated getter methods, remove extraneous if statements 2016-07-05 21:30:09 -07:00
Hannah Trosi
3994f2089c [ASCellNode] Final revisions to behavior of setSelected: & setHighlighted: 2016-07-05 17:47:00 -07:00
Gareth Reese
b9b002354a [ASVideoNode] Only seek to beginning when auto repeating 2016-07-05 13:27:53 +01:00
Hannah Troisi
682ddcfe51 [AsyncDisplayKit+Utilities.h] Convenience methods for creating resizable circles & rounded rects. (#1811)
* [AsyncDisplayKit+Utilities.h] UIImage category for performant (optionally rounded) flat color stretchable images

* treat clear background color as no background color (D99117)

* add borderWidth

* add several shorter methods per Scott's comment

* rename files and add to AsyncDisplayKit.h

* fix xcode project file

* update commentse
2016-07-04 16:34:16 -07:00
Michael Schneider
c20f452dca Remove check for [UIDevice systemVersion] check if running on iOS 7 (#1843) 2016-07-03 21:47:35 -07:00
Michael Schneider
9de014f179 Change applySubnodeTransition to startTransition 2016-07-03 14:38:26 -07:00
Michael Schneider
bf6fbd173d Address first comments 2016-07-03 13:33:23 -07:00
Hannah Trosi
61d7c093a1 Merge branch 'master' into selectionBug 2016-07-02 11:50:19 -07:00
Hannah Trosi
3080ee33cf Revert "update from master/"
This reverts commit d7fde61e168b6594ca5d74836597b0aac0e83e9b.
2016-07-02 11:45:40 -07:00
Michael Schneider
52a34db884 Add pending state for range mode in ASTableNode and ASCollectionNode 2016-07-02 10:27:52 -07:00
Michael Schneider
9be2f1db4e Prevent calling endUpdatesAnimated:completion: in an unbalanced way 2016-07-02 10:17:09 -07:00
Adlai Holler
5d7f3b4293 Merge pull request #1819 from kielgillard/master
[ASDisplayNodeExtras] Collect subnodes passing the test
2016-07-02 08:55:51 -07:00
Adlai Holler
4d67b44944 Merge pull request #1808 from maicki/MSCacheSelectorFlagsNetworkImageNode
[ASNetworkImage] Use flags to cache instead of instance variables for caching respond to selector calls
2016-07-02 08:39:59 -07:00
Adlai Holler
f4ccb93969 Merge pull request #1788 from gazreese/ASVideoNode-overwrittenplaceholder
[ASVideoNode] issue #1782 Placeholder images are replaced by blanks during loading
2016-07-02 08:30:38 -07:00
Scott Goodson
d2d8b0a1cb [ASDisplayNode] Adjust behavior of -removeFromSupernode to ensure "root" nodes are removed from their superview/superlayer.
This situation is relatively uncommon.  If a user manually uses -[UIView addSubnode:], the convenience category method,
and then calls -[ASDisplayNode removeFromSuperview] -- we would bypass performing the actual removal as no supernode pointer
is set.  After further consideration, the special handling here to support divergence between the supernode pointer and
the view / layer hierarchy is not something we need to maintain going forward, and removing it makes addressing this easy.
2016-07-01 20:11:23 -07:00
Michael Schneider
01fed69b26 Adds trampoline for inserting and deletion of nodes
Currently measurement always needs to happen on the main thread if implicit hierarchy management is enabled as adding and removing from nodes needs to happen on the main thread. We now will trampoline to the main thread to do the insertion and deletion of nodes.

This also resolves the issue that can occur if a node is already loaded deep in the layout hierarchy in the layout that the node is transforming to. Before insertion or deletion is happening we need to crawl the layout hierarchy to check that though.
2016-07-01 16:33:37 -07:00
Hannah Trosi
d7fde61e16 update from master/ 2016-07-01 16:25:48 -07:00
Michael Schneider
9501299eed Use flags to cache instead of instance variables for caching respond to selector calls 2016-07-01 16:02:58 -07:00
Adlai Holler
a77a6eaaf5 Merge pull request #1820 from gazreese/ASCollectionView-tuning-parameters
[ASCollectionView] Tuning parameters not set
2016-07-01 15:09:01 -07:00
Adlai Holler
988098be26 Merge pull request #1837 from gazreese/ASVideoPlayerNode-placeholder-image
[ASVideoPlayerNode] Expose placeholder image for the underlying ASVideoNode
2016-07-01 14:50:29 -07:00
Adlai Holler
3814f42074 Merge pull request #1838 from levi/patch-18
[ASPagerNode] Add nodeForPageAtIndex:
2016-07-01 14:21:35 -07:00
Adlai Holler
96fb5b3261 Merge pull request #1786 from maicki/FixPlaceholderIsNotAppearing
[ASDisplayNode] Handle placeholder layer creation in case the size of the node changes after the initial placeholder layer was created
2016-07-01 13:54:01 -07:00
Adlai Holler
d8efa54f21 Merge pull request #1806 from maicki/MSAddASButtonNodePreferredFrameSize
[ASButtonNode] Add support for 'preferredFrameSize' to ASButtonNode
2016-07-01 13:50:33 -07:00
Adlai Holler
ebaa2c157e Remove aggregate CGRect initializers in ASDataController 2016-07-01 11:47:05 -07:00
Levi McCallum
53bc126ae5 Add implementation of nodeForPageAtIndex: 2016-07-01 09:42:39 -07:00
Levi McCallum
b1ceab7a61 Add nodeForPageAtIndex: to header and clean up doc 2016-07-01 09:39:36 -07:00
Gareth Reese
0a5f03e8fc Merge master into ASVideoPlayerNode-placeholder-image 2016-07-01 15:33:00 +01:00
Gareth Reese
09a344b669 [ASVideoPlayerNode] Expose the placeholder image for the video player node 2016-07-01 15:15:10 +01:00
ricky
8c3025bb12 [ASDisplayNode] added asyncTraitCollectionDidChange method (#1831)
Subclasses can override this method to react to a trait collection change
2016-06-30 19:45:29 -07:00
Michael Schneider
8804342a98 Don't propagate trait collections to cells if the node is not loaded yet (#1833)
This fixes an issue where the propagation of trait collections trigger are creation of the node if the node view was not loaded yet.
2016-06-30 19:44:40 -07:00