Commit Graph

2238 Commits

Author SHA1 Message Date
ricky
bd907dcffd added comment 2016-07-15 15:39:30 -07:00
ricky
c403175b91 [ASTextNode] use accessor for pointSizeScaleFactors
I have a subclass of `ASTextNode` that uses `pointSizeScaleFactors`. Currently I have to recompute the scale factors any time the font size changes. If `_rendererAttributes` used the property accesor for the scale factors I would only have to create them when asked. I hope this little change can make it in :)
2016-07-15 08:47:25 -07:00
Michael Schneider
359785ac92 [ASDisplayNode] Add automatic measurement before layout (#1725)
* Add automatic measurement before layout

* Remove code not needed or addressed in a different PR

* Adjust comments and rename __layoutSublayouts to __layoutSubnodes

* Check before setting up a placeholder layer if the node should have a placeholder
2016-07-14 21:51:40 -07:00
Michael Schneider
a8c5ac138d [ASDisplayNode] Always layout nodes on a background thread (#1907)
* Always layout nodes on a background thread

* Remove semaphore in ASDataController for allocating nodes and layout

* Fix variable not used error

* Remove overhead to create subarray of contexts of nodes while layout nodes

* Remove extra allocation of allocatedNodes and indexPaths array
2016-07-14 21:35:58 -07:00
Garrett Moon
aaea4a4d85 Class was in wrong #ifdef, thank you @schneider! 2016-07-14 14:57:40 -07:00
Garrett Moon
92e16fb7a6 Share ASDK's PINRemoteImage cache with default instance of PINRemoteImage 2016-07-14 14:57:35 -07:00
Michael Schneider
cd46791f9d Move check for iOS 9 from an early return to an earlier check to prevent objc_msgSend 2016-07-14 14:50:54 -07:00
Michael Schneider
6e8772a68d Fix sizing of root node in ASViewController for modal presentation and root view controller 2016-07-14 14:48:05 -07:00
Michael Schneider
ce98e56352 Use getter of layout inspector to create it lazily and not have to create it at initialization time 2016-07-13 16:36:48 -07:00
Michael Schneider
8b3ec83bfd Small name changes 2016-07-13 16:36:48 -07:00
Michael Schneider
d82a2e810f Move methods regarding supplementary nodes to optional in ASCollectionViewLayoutInspecting 2016-07-13 16:36:48 -07:00
Michael Schneider
30bb2ee93d Address comments from @levi 2016-07-13 16:36:48 -07:00
Michael Schneider
9fb3129a0e Add default ASCollectionViewLayoutInspecting for custom ASCollectionViewLayout 2016-07-13 16:36:48 -07:00
Michael Schneider
35c860c183 Refactor usage of ASCollectionViewLayoutInspecting
- Fix not using itemSize of UICollectionViewFlowLayout
- Move automatic constrained size calculation to the ASCollectionViewFlowLayoutInspector
- Provide a null layout inspector for throwing exceptions if a custom
  UICollectionView is given but no ASCollectionViewLayoutInspecting
- Fix not checking for optional layout inspecting data source methods
  are implemented or not
- Improving tests around ASCollectionViewLayoutInspecting
2016-07-13 16:36:48 -07:00
Michael Schneider
e30c76c5ad Remove deprecated selected and highlighted methods (#1909) 2016-07-13 10:13:31 -07:00
Adlai Holler
e40597ec47 Merge pull request #1792 from george-gw/prMapNode
[ASMapNode] bug fixes + added the ability to zoom in on the annotations + example project
2016-07-12 14:42:47 -07:00
Adlai Holler
edb4e45c24 [ASRangeController] Update synchronously when possible 2016-07-12 14:36:20 -07:00
Adlai Holler
2e3da9bc92 Merge pull request #1903 from nguyenhuy/ASButtonNode_updateTitle
[ASButtonNode] Correctly compare and update its title
2016-07-12 11:34:22 -07:00
Michael Schneider
dc2255d5d8 Fix setNeedsLayout triggered from subnode will not trigger relayout 2016-07-12 09:26:40 -07:00
Huy Nguyen
4b331be1e8 Correctly compare and update title of ASButtonNode 2016-07-12 21:25:22 +07:00
George A
396583dbaa [ASMapNode] Protected showAnnotationsOptions with a lock. 2016-07-12 08:01:17 +02:00
Adlai Holler
6b44b5ac05 [ASTableView] Add retainedLayer a la collection view (#1896) 2016-07-11 20:22:45 -07:00
Michael Schneider
7f4737217e Change from MutexLocker / MutexUnlocker to lock() and unlock() directly on property lock (#1900)
For performance reasons change to directly lock and unlock calls on the property lock instance
2016-07-11 17:04:47 -07:00
Michael Schneider
93ee42db57 Remove assert in visibleStateDidChange: in ASCellNode (#1899)
This assertion is failing in some apps and will be enabled soon.
2016-07-11 17:04:20 -07:00
George A
f9629beabb [ASMapNode] Defaulting userInteractionEnabled to YES. 2016-07-11 20:48:12 +02:00
ricky
57ece0f46e [ASLayoutSpec] Bug where finalLayoutable was not being called for setChildren 2016-07-11 09:54:03 -07:00
George A
69ca67b578 Code cleaning and fixes based on code review. 2016-07-11 10:43:19 +02:00
Scott Goodson
012c927cd8 [ASLayout] Small optimization to eliminate one method call in an extremely hot codepath.
This was observed with quantitative profiling results.  We have some opportunities to micro-optimize the layout objects.
2016-07-10 23:02:39 -07:00
appleguy
a9e3eacfe5 [ASCellNode] Add gating for -convertRect: call upon invisibility notification for iOS 7 & 8 edge case. (#1881)
* [ASCellNode] Add gating for -convertRect: call upon invisibility notification for iOS 7 & 8 edge case.

This should resolve https://github.com/facebook/AsyncDisplayKit/issues/1659, which corresponds to this
Fabric log for Pinterest: https://fabric.io/pinterest6/ios/apps/com.pinterest.enterprise/issues/5776fbfeffcdc042501a5f20/sessions/c178e977614b4ebab853084847fb241
8

* [ASCellNode] Additional improvements to visibilityDidChange: gating.
2016-07-10 16:01:55 -07:00
Flo
2e65339f33 [ASVideoNode, ASVideoPlayerNode] Add video composition and audio mix capabilities (#1800)
* [ASVideoNode] Add delegate method called when the currentItem is set.

* [ASVideoNode] Add videoComposition and audioMix properties to the ASVideoNode.

* [ASVideoPlayerNode] Add new initialiser with videoComposition and audioMix, and forward new delegate method.

* [ASVideoPlayerNode] Forward missing ASVideoNodeDelegate methods.
2016-07-10 11:32:21 -07:00
Hannah Troisi
10447998af [ASMapNode] use ASDisplayNode base class lock (#1879)
* [ASVideoPlayerNode] Use ASDisplayNode base class lock for subclass property syncrhonization, fix retain cycles

* [ASMapNode] Use ASDisplayNode base class lock instead of subclass lock
2016-07-10 00:30:37 -07:00
Scott Goodson
bf9c142765 Revert "[ASTextNode] Fix text node truncation (#1863)"
This reverts commit 6238e5edbd.

We will re-apply this change, but there are some early signs of performance impacts that need to be investigated.
2016-07-09 23:54:43 -07:00
Scott Goodson
d83f319fe3 Revert "Use textStorageCreationBlock for resetting the text storage (#1874)"
This reverts commit d646d3c753.
2016-07-09 23:54:28 -07:00
Hannah Troisi
ff7a586eba [ASVideoPlayerNode] Use ASDisplayNode base class lock for subclass property syncrhonization, fix retain cycles (#1878) 2016-07-09 23:51:49 -07:00
Scott Goodson
1d07759c9e [ASDisplayNode+AsyncDisplay] Add locking for _flags (although write-once-on-init, this quiets the Thread Sanitizer). 2016-07-09 23:50:40 -07:00
Eric Horacek
3efd01a781 [ASCollectionDataController] Repopulate deleted supplementary nodes if necessary (#1773)
* Repopulate deleted supplementary nodes if necessary

Fixes 1771

* Fix warning
2016-07-09 22:46:29 -07:00
Hannah Troisi
f39c2ce7e3 [ASTextNode, ASImageNode, ASVideoNode] Use ASDisplayNode base class lock for subclass property synchronization (#1877)
* [ASTextNode, ASVideoNode] Use ASDisplayNode base class lock for subclass property synchronization

* fix headers to match master

* address @appleguy, @maicki comments

* import header

* Swap lock in ASNetworkImageNode as well

* remove invalid comment

* more cleanup of locks
2016-07-09 22:08:34 -07:00
Flo
131dd25de3 [ASNetworkImageNode] Check that data is not nil before loading the animated image. (#1849) 2016-07-09 21:19:57 -07:00
appleguy
dc12042589 [ASDisplayNode] Do not start measurement for a transition if we have never been provided a constrainedSize. (#1844) 2016-07-09 21:16:29 -07:00
appleguy
3b2af7eb6d [Build] Remove Unused Imports across all of AsyncDisplayKit. This uses a feature of AppCode. (#1875)
Details on the tool are here: https://www.jetbrains.com/help/idea/2016.1/optimizing-imports.html
2016-07-09 17:20:59 -07:00
Michael Schneider
e7e2672472 Move imageLock in braces for getting drawing parameters (#1876) 2016-07-09 17:02:05 -07:00
Michael Schneider
d646d3c753 Use textStorageCreationBlock for resetting the text storage (#1874) 2016-07-09 16:43:18 -07:00
Scott Goodson
48311aee96 [Build] Fix build issue caused by an #import change. 2016-07-09 16:09:35 -07:00
gazreese
01ba38d818 [ASVideoPlayerNode] Ensure activity indicator view is transparent (#1852) 2016-07-09 16:00:48 -07:00
Scott Goodson
f0ff9c108d Merge branch 'master' of git://github.com/kielgillard/AsyncDisplayKit into kielgillard-master 2016-07-09 15:44:31 -07:00
Michael Schneider
6238e5edbd [ASTextNode] Fix text node truncation (#1863)
* Before truncate a text storage in ASTextKitContext reset the text storage to original value

* Fix ASTextNode tests

We should pass in the constrained size in both cases and the sizes should be the same. We adjust the calculated size in ASTextNode to be a bit narrower in the second case if we truncate again with the calculated size as constrained size it will truncate more and the resulting size will shrink.
2016-07-09 15:40:31 -07:00
Adlai Holler
38fab7cd94 Merge pull request #1816 from hannahmbanana/selectionBug
[ASCellNode] Fix selection / highlight implementation
2016-07-08 15:48:22 -07:00
Adlai Holler
0f589d7e2b Merge pull request #1847 from gazreese/ASVideoNode-no-auto-seek
[ASVideoNode] Only seek to beginning when auto repeating
2016-07-08 15:45:17 -07:00
Adlai Holler
a2d4dc5888 Merge pull request #1839 from maicki/MSAsyncMeasure
[ASDisplayNode] Allow measure always be off the main thread
2016-07-08 15:41:05 -07:00
Adlai Holler
09069584cc Merge pull request #1871 from maicki/MSMoveDeallocASImgeNode
[ASImageNode] Move dealloc method from ASImageNode+AnimatedImage category to ASImageNode
2016-07-08 15:20:06 -07:00