334 Commits

Author SHA1 Message Date
Hannah Troisi
87595c7d3b [Layout API] Rename ASStaticLayoutSpec to ASAbsoluteLayoutSpec (#2288)
* Rename static to absolute

* Fix examples, rename ASAbsoluteLayoutSpec class method

* rename +staticLayoutSpecWithChildren to +absoluteLayoutSpecWithChildren

* address Michael's comments
2016-09-28 13:05:31 -04:00
Michael Schneider
416d8f92e1 [Layout] Add delegate to ASLayoutableStyle for property changes (#2283)
* Add delegate to ASLayoutableStyle for property changes

* Moving ASLayoutableStyle delegate to readonly

* Add ASLayoutableStyleTests

* Fix property stirngs

* Fix video example

* Address comments of Adlai
2016-09-27 16:50:36 -04:00
appleguy
fc09badf94 Update build script to run against iOS 10 to fix Jenkins (#2305)
* Update build script to run against iOS 10 to fix Jenkins

* Update Swift example project with iOS 10 build fixes.

* Fix Videos example app to use new style API for layout properties.

* Update Frameworks smoke test to newer Swift language settings.
2016-09-26 18:46:22 -07: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
75dca556e6 [Layout] Add style property to ASLayoutable (#2261)
* Add style property to ASLayoutable

* Add styles property to further layout specs

* Adjust some examples

* Add `loadStyle` to create the style object in a ASLayoutable

* Revert "Add `loadStyle` to create the style object in a ASLayoutable"

This reverts commit 2b7240f2c7dc993e38cadf290cfdf08482dd70c7.

* Revert "Adjust some examples"

This reverts commit 3254ae0a321e75db3ecfa80adee9d96bde93a33d.

* Revert "Add styles property to further layout specs"

This reverts commit c779dcb876ead27122c1af1300146a6ad36912cb.

* Rename ASLayoutableStyleDeclaration to ASLayoutableStyle

* Add styleClass class property for extensibility support of the ASLayoutable style object

* flexShrink should not be YES by default
2016-09-22 16:00:52 -07:00
Michael Schneider
53a6743908 Don't use automaticallyManageSubnodes in ASTextCellNode (#2212) 2016-09-08 11:17:50 -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
33a680255c [ASDisplayNode] Add Convenience Interface State Accessors (#2168)
* Finish renaming fetchData range, add convenience accessors

* Update example

* Update new tests
2016-09-01 16:44:16 -07:00
Adlai Holler
5e3627a9cd [ASTextNode] Actually deprecate attributedString property (#2151) 2016-09-01 16:43:03 -07:00
Michael Schneider
f8e135a1be Add old transition API back but allow call from background thread (#2135) 2016-09-01 16:09:59 -07:00
Michael Schneider
68d6d6f5b4 [ASDisplayNode] Add documentation for range state changes and moved deprecated header to category file (#2170)
* Add documentation for range state changes and moved deprecated header to category file

* Fix self.usesImplicitHierarchyManagement not found
2016-08-31 15:39:23 -07:00
Michal Ziman
873bae2eed [ASMapNode] Add custom pin annotation for static maps (#1890)
* Adds possibility to have custom annotation pins on static map. This resolves #1889.

* Removes wrong example for map annotations and adds some annotations to correct map example. #1889

* Static map node now uses specific property block to get annotation views.

* Changes self to strongSelf inside of the snapshotters completion block.

* MapNode: Adds statement in documentation.

* MapNode: Block for annotation view/image now returns UIImage and center offset is returned in inout param.

* MapNode and map example: Fixes from review.

* MapNode example: Gets image directly from custom annotation, without creating annotation view.
2016-08-22 10:44:29 -07:00
Michael Schneider
adcc9afb5a [Layout Transition] Add default fade in / out layout transition (#2052)
* Add default fade in / out layout transition

* Add example for layout transition

* Update for recent layout transition API changes

* To be able to do a layoutTransition the node needs to be loaded

* Rename layoutTransitionDuration to defaultLayoutTransitionDuration

* Expose default layout transition duration delay and options

* Use `UIViewAnimationOptionBeginFromCurrentState` for initial defaultLayoutTransitionOptions
2016-08-13 17:35:20 -07:00
Michael Schneider
93be894e0c [ASCollectionView / ASPagerNode] Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate (#2065)
* Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate in ASCollectionView and ASPagerNode

* Fix ASPagerNode declaration of dataSource and delegate

As ASPagerDataSource does not inherit from ASCollectionDataSource it's not possible to declare it as property.

* Update comment
2016-08-12 15:37:23 -07:00
Hannah Troisi
2040674aed Merge pull request #1767 from facebook/AHPercentToFraction
[ASRelativeDimensionType] Replace "percent" with "fraction" Where Appropriate
2016-08-11 20:33:34 -07:00
Michael Schneider
075dd73280 Parse RFC 3339 date time strings around 7-8 times faster (#2059) 2016-08-11 12:46:26 -07:00
Hannah Troisi
2afd063b10 [ASRangeController] Debug overlay to show the size and direction of display + fetchData ranges during scrolling. (#2008)
* Rebase ASRangeController diff with master.

* fix Table / CollectionNode debug label names
- now returns class names rather than generic ASTableNode, ASPagerNode
- ASPagerNode will be labeled as ASPagerNodeProxy (not sure how to get around this)

* refactor layout code: use ASDk's own resizeableRoundedCorner... methods

* Fixes and cleanup for manual layout version of range controller debug overlay.

I am working on a layout spec-based version, but it has some issues, so landing this to get the near-term value is probably the best next step.

* Remove .orig and .rej files.

* One last .orig file to remove.

* Final project file cleanup and tweaks to implementation for ASTableNode.

* fix build issues

* fix arrow directions
2016-08-11 11:23:07 -07:00
Adlai Holler
f07d5c4e99 [Examples] Percent -> Fraction 2016-08-10 10:26:21 -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
Fedor Vetoshko
12697f158f AsyncDisplayKitOverview collection nodes size fix 2016-07-13 15:58:15 +03: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
George A
41e26374e3 Removed debugging messages from ASMapNode's sample, they are no longer needed. 2016-07-11 20:52:48 +02:00
Hannah Trosi
2317e17c53 Remove UIKit call from -init!1 2016-07-10 21:17:32 -07:00
Kiel Gillard
762e9832df Make ASViewController sample build and run. 2016-07-07 15:41:21 +10:00
Gareth Reese
9349abb737 Merge branch 'master' of https://github.com/facebook/AsyncDisplayKit into ASVideoNode-overwrittenplaceholder 2016-06-24 11:39:12 +01:00
Hannah Troisi
d850057916 [Travis CI] move carthageBuildTest to examples_extra to avoid Travis error 2016-06-23 16:25:48 -07:00
Hannah Troisi
54e29d2236 [Carthage] fix travis build error (#1804)
* [Carthage] Add cartfile, update example

* [Carthage] fix travis build issue

* [Carthage] fix cartfile for travis build error

* capitalization fix
2016-06-22 23:22:42 -07:00
Hannah Troisi
eb9e8167c3 [Carthage] Add cartfile, update Carthage example (#1796) 2016-06-22 15:37:31 -07:00
George A
83d610cd54 [ASMapNode] Toggle user interaction when liveMap changes (#1753)
[ASMapNode] Change map snapshot when updating it with a new region (#1754)
[ASMapNode] Commented out code that is causing inaccurate behavior
[ASMapNode] Added the ability to zoom in and show annotations, similar to showAnnotations:animated: of MKMapView.
Added a basic example for ASMapNode to try out the different changes
2016-06-21 16:13:55 +02:00
Gareth Reese
062bcf3631 [ASVideoNode] issue #1782 Placeholder images are replaced by a blank placeholder. Now checks the .URL property of the parent class as well as the .image to ensure that new placeholders aren't generated. 2016-06-21 07:51:58 +01: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
Michael Schneider
1f55ef8945 Improve PagerNode sample project 2016-06-09 15:46:08 -07:00
Levi McCallum
20523821f9 Revert "Merge pull request #1673 from maicki/AddAutomaticMeasureBeforeLayout"
This reverts commit 2e384a32e15d34ea8f963dbc4e44aaa297ca019b, reversing
changes made to b8618d3151d9714d24ccfd935b92a99b774442f1.
2016-06-06 13:12:10 -07:00
Levi McCallum
c809609b01 Update pager example 2016-06-05 09:30:57 -07:00
Levi McCallum
a0ebfb685a Fix example 2016-06-05 09:30:57 -07:00
Michael Schneider
691749d098 Address comments 2016-06-03 14:18:49 -07:00
Michael Schneider
ecd7727ceb Update Videos example to leverage automatic measure: call before layout 2016-06-03 13:24:47 -07:00
Michael Schneider
521786cf64 Fix disappearing of social app example divider
UITableViewCell traverses through all its descendant views and adjusts their background color accordingly either to [UIColor clearColor], although potentially it could use the same color as the selection highlight itself. After selection, the same trick is performed again in reverse, putting all the backgrounds back as they used to be. But in our case, we don't want to have the background color disappearing so we reset it after highlighting or selection is done.
2016-05-30 15:02:59 -07:00
Erekle
4ab0f1ec60 [ASVideoPlayerNode] fixes; Ability to add custom controls 2016-05-23 23:23:33 +04:00
Erekle
03f193c58b Merge remote-tracking branch 'facebook/master' into ASVideoPlayerNode 2016-05-22 13:49:36 +04:00
Erekle
49b2726632 fixed old examples 2016-05-20 12:21:57 +04:00
Jonas Schmid
94b88ad1ab Removed DevelopmentTeam setting in sample (#1682) 2016-05-19 13:20:37 -07:00
Erekle
100d2b4f26 moved spinner to ASVIdeoPlayerNode 2016-05-19 15:07:39 +04:00
Erekle
39e287f0d6 fixes suggested by levi 2016-05-18 00:45:40 +04:00
Erekle
d9b84db614 Merge remote-tracking branch 'facebook/master' into ASVideoPlayerNode 2016-05-17 23:34:20 +04:00
Erekle
8c8fc3dba0 Adding ASVideoPlayerNode 2016-05-17 11:08:53 -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
Erekle
db95771b33 enable/disable controls 2016-05-13 01:49:46 +04:00
Erekle
ae5440ad11 updated example 2016-05-12 13:26:39 +04:00
Erekle
d0345549f6 Merge remote-tracking branch 'facebook/master' into ASVideoPlayerNode
# Conflicts:
#	AsyncDisplayKit.xcodeproj/project.pbxproj
2016-05-12 13:05:24 +04:00