281 Commits

Author SHA1 Message Date
ricky
59a26ee111 [ASTraitCollection] Bug fixing/LayoutSpec propagation
* Fixed bug in `ASEnvironmentMergeObjectAndState`
* New ASLayoutSpec methods for `setChild`/`setChildren`/`setChild:forIdentifier:` have been added to take in a trait collection.
* Added `setChild:`-like methods for ASLayoutSpecs take a traitCollection
* Fixed instances where nodes in a data controller were not getting their trait collections
* propagate traitCollection in ASDisplayNode on insertSubnode or addSubnode
2016-05-23 16:37:40 -07:00
Jonas Schmid
94b88ad1ab Removed DevelopmentTeam setting in sample (#1682) 2016-05-19 13:20:37 -07:00
Scott Goodson
d26b489529 [Examples] Move several simpler, single-purpose examples to extras to ensure Travis does not time out. 2016-05-17 10:52:43 -07:00
rcancro
4b54144f55 Levi's comments 2016-05-11 10:21:11 -07:00
rcancro
92ed02fc60 fix indentation 2016-05-10 14:45:21 -07:00
rcancro
9d622c7eac changed DisplayTraits to TraitCollection 2016-05-10 14:45:03 -07:00
rcancro
223a5f04b1 fix build errors 2016-05-10 14:44:53 -07:00
rcancro
f828d079fa added nsobject based ASDisplayTraits class 2016-05-10 14:44:43 -07:00
rcancro
b4a6f87ca6 addressed some comments 2016-05-10 14:44:32 -07:00
rcancro
8bb4eba080 Initial attempt at implementing Display Traits
Initial attempt to get display traits working with ASEnvironment.

To get proper ASDisplayTraits support, you must use an ASViewController. The ASViewController implements UITraitCollection-related methods (`traitCollectionDidChange:`, `willTransitionToTraitCollection:withTransitionCoordinator:`, viewWillTransitionToSize:withTransitionCoordinator`) to update the internal ASDisplayTraits and propagate them to subnodes.

ASTableNode and ASCollectionNode don't actually have their cells as subnodes, so a little bit of trickery is involved (on `setEnvironment:` the table/collection node gets its data controllers completedNodes and propagates the new traits. see `ASDisplayTraitsCollectionTableSetEnvironmentState`). The data controller also passes the current display traits when creating new cells.

ASViewController also supports the ability to return a custom set of display traits. So if you have a modal dialog that should always be told it is in a compact size class, you can set the override block before displaying the VC.

A new example, called Display Traits, has been added. It shows how display traits can be used in a ASViewController with a normal ASDisplayNode as its root, as well as in ASViewControllers hosting table nodes and collection nodes. There is also an example of overriding the default display traits of a VC.

Please provide feedback!
2016-05-10 14:44:22 -07:00
Michael Schneider
cac4ed5626 Move layout of ASVideoNode to layout specs
- This should fix adjusting a custom play button position
- Fix sample project use of ASVideoNode
2016-05-05 16:49:01 -07:00
appleguy
3ee6c88ae4 Merge pull request #1608 from Eke/master
[ASVideoNode] Several new delegate methods and ASVideoNodePlayerState to monitor and control playback
2016-05-04 20:33:23 -07:00
Erekle
82cc6f49f2 coding style fixes 2016-05-05 01:49:52 +04:00
Scott Goodson
f505c17efe [Build / Cocoapods] Presumably-final fix to AnimatedGIF project configuration. 2016-05-03 21:06:14 -07:00
Scott Goodson
7acdf6ab37 [Build / Cocoapods] Fix AnimatedGIF Podfile to use Sample as the target name, which is the correct one. 2016-05-03 20:42:15 -07:00
Michael Schneider
23f0ded2bc Fix AnimatedGIF example Podfile 2016-05-03 20:38:11 -07:00
Erekle
2c2a73dc83 playbackBufferEmpty and spinner
added playbackBufferEmpty logic, moved spinner show/hide to separate
methods.
2016-04-29 20:49:14 +04:00
Erekle
399703dbb2 new delegate methods
Added new delegate methods; updated Videos example project
2016-04-29 12:59:15 +04:00
Michael Schneider
35de3051a7 Enable sharing for Sample target 2016-04-27 15:52:14 -07:00
Michael Schneider
a05963d48d Add Sample Target 2016-04-27 15:52:14 -07:00
Michael Schneider
5969c7c0ae Initial commit for AsyncDisplayKitOverview 2016-04-27 15:52:14 -07:00
Garrett Moon
7f8edb8537 Specifies beta of PINRemoteImage 2016-04-25 13:18:31 -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
Garrett Moon
0fc39d1ccd Follow up to animated GIF PR 2016-04-19 13:43:41 -07:00
Scott Goodson
11744b7f31 [ASVideoNode] Cleanup from recent diffs, standardizing on .asset rather than .url. 2016-04-17 20:12:37 -07:00
appleguy
94d0d908dc Merge pull request #1323 from gazreese/AVPlayerItem-construction
[ASVideoNode] Add support for HTTP Live Streaming Video
2016-04-17 19:30:23 -07:00
appleguy
c51907879d Merge pull request #1530 from hannahmbanana/500pxgram
[ASDKgram example update] Use -fetchData in PhotoCellNode to load Comments & addressed PR comments
2016-04-16 20:48:32 -07:00
Hannah Troisi
4e8d835280 [ASDKgram example update] addressed PR comments
- overrode the -(void)fetchData method in PhotoCellNode.m to download the photo’s comments. This method gets called with the PhotoCellNode enters ASInterfaceStateFetchData, which is set by the rangeController.
    - UIKIT COMPARISON: I left the comment bulk download (for all photos in a page load) in the PhotoFeedViewController side for UIKit because when implemented in the PhotoTableViewCell, each cell jumped around as it changed size when it came on screen.
- minor appearance updates
    - updated color scheme
    - fixed status bar style to darkBackgroundColor
- cleaned up layoutSpecThatFits: in PhotoCellNode
2016-04-14 00:52:05 -07:00
Garrett Moon
482ba3cbb0 Fix ASAnimatedImage Sample 2016-04-13 14:23:02 -07:00
Garrett Moon
59b18efc76 Needs to be named Sample.xcodeproj 2016-04-13 14:23:02 -07:00
Garrett Moon
e9b57d9da4 Address comments and cleanup 2016-04-13 14:23:02 -07:00
Garrett Moon
1b316217ef Downstream ASAnimatedImage 2016-04-13 14:23:02 -07:00
Garrett Moon
3bcbfb149d Add support for animated GIFs
Summary:
Use NSData as key

Add chunking of files

Add support for Animated Images

This adds support for GIF playback in ASDK. It's not currently ready
for merging to public ASDK – for one the GIF decompression may make
more sense in PINRemoteImage.

Removed duration as it wasn't used

Make cover image lazily loaded

Differential Revision: https://phabricator.pinadmin.com/D82033
2016-04-13 14:23:02 -07:00
Hannah Troisi
23d00d40e1 [New Example] 500pxgram
- added UIActivityMonitor
- added simple NSCache for UIKit tab
2016-04-11 19:04:05 -07:00
Hannah Troisi
89ab6b38fc [New Example] 500pxgram updates
- added UIKit autolayout to UIKit PhotoTableViewCell
2016-04-11 13:31:31 -07:00
Hannah Troisi
44d483b7fe [New Example] 500pxgram updates
- addressed all comments in PR except autolayout of UIKit code
2016-04-10 23:34:41 -07:00
Hannah Troisi
decb623d38 Merge remote-tracking branch 'facebook/master' into 500pxgram 2016-04-10 21:46:51 -07:00
Scott Goodson
ccddb36ed9 [ASDisplayNode] Ensure that Visible interfaceState is cleared on removal from hierarchy for rasterized elements. 2016-04-07 14:10:34 -07:00
Gareth Reese
9e28e07925 ASVideoNode updates based on review comments in https://github.com/facebook/AsyncDisplayKit/pull/1323 2016-04-07 14:08:45 +01:00
Gareth Reese
c8a414be9b Merged branch 'master' into AVPlayerItem-construction 2016-04-06 15:22:10 +01:00
Hannah Troisi
7a5c64f59e Removed resetDataModel on tab switching. 2016-04-05 21:59:16 -07:00
Hannah Troisi
50bb7d9386 - Partial implementation of feature resetPhotoFeedModel when switching between UIKit / ASDK tabs.
- Replaced NSData data fetches with NSURLSession
2016-04-04 20:43:07 -07:00
Hannah Troisi
e07827bf64 Merge remote-tracking branch 'facebook/master' into 500pxgram 2016-04-04 20:33:14 -07:00
Hannah Troisi
caf2e43d57 ASDKgram Refactoring
- replace ASTableView's nodeForRowAtIndexPath: with nodeBlockForRowAtIndexPath:  (performance gain because nodeBlock can be called concurrently)
- replace scrollViewDidScroll: method for determining when to loadPage for ASTableView’s data model with ASBatchContext
2016-04-04 18:46:50 -07:00
Hannah Troisi
dbad1c38e5 [ASEnvironment - Layout] Fixes to upward propagation of ASLayoutable properties. 2016-04-02 15:03:43 -07:00
Hannah Troisi
883f2b2b99 added screenshots/gifs and descriptions to examples/README.md 2016-03-30 12:34:35 -07:00
Hannah Troisi
02509fa225 Testing adding screenshot to README.md 2016-03-30 10:10:39 -07:00
Hannah Troisi
55efc4cfb3 Final code cleanup 2016-03-29 14:53:42 -07:00