47 Commits

Author SHA1 Message Date
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
appleguy
eeb977e145 [ASDisplayNode] Ensure all subclasses are using base class __instanceLock__ and not re-defining their own. (#2754)
* [ASDisplayNode] Ensure all subclasses are using base class __instanceLock__ and not re-defining their own.

This also moves the @package definition of the instance variable to +FrameworkPrivate instead of Internal.h,
because Internal.h should ideally not be used outside of the ASDisplayNode file setup.  This has greatly reduced
the number of imports of Internal.h.

* [ASDisplayNode] Add ASDisplayNode+FrameworkSubclasses.h to share __instanceLock__ definition.
2016-12-12 19:42:41 -08:00
Garrett Moon
ba2268ac99 2611 rename fetch data (#2689)
* Replace fetch data with preload terminology
- Deprecate `-fetchData` and `-clearFetchedData` in favor of `-preload` and `-clearPreloadedData`
- Move `-setNeedsPreload`, `-recursivelyPreload` and `-recursivelyClearPreloadedData` to ASDisplayNode+FrameworkPrivate.h
- Update internal implementation, comments and tests

* Folllow up on #2642:
- Remove -preload and -clearPreloadedData in favor of -didEnterPreloadState and -didExitPreloadState.
- -didEnterPreloadState and -didExitPreloadState call the deprecated -fetchData and -clearFetchedData methods if they are overriden.

* Missed one in a test

* Get rid of behavior change for now.

* Revert more behavior changes, fix tests.

* Don't need these anymore.
2016-12-01 13:41:22 -08: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
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
Hannah Trosi
971d43ad4d [Build settings] add missing newlines at end of file 2016-08-18 15:01:41 -07:00
Hannah Troisi
893e601e81 Convert to type-generic math (#2050)
* [Optimization] Convert to type-generic math

* add std:: prefix in obj-c++ files

* more cleanup

* revert test changes

* convert min and max back to fmin/fmax
2016-08-09 15:31:37 -07:00
appleguy
74bf376b2f [ASDisplayNode] Rename _propertyLock to __instanceLock__ to avoid subclass naming collisions. (#1941) 2016-07-16 15:32:13 -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
George A
396583dbaa [ASMapNode] Protected showAnnotationsOptions with a lock. 2016-07-12 08:01:17 +02:00
George A
f9629beabb [ASMapNode] Defaulting userInteractionEnabled to YES. 2016-07-11 20:48:12 +02:00
George A
69ca67b578 Code cleaning and fixes based on code review. 2016-07-11 10:43:19 +02: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
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
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
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
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
Adlai Holler
646797e335 [ASMapNode: Snapshotting] Cancel on dealloc, avoid retaining self 2016-05-04 18:25:22 -07:00
appleguy
be6c3ed88c Merge pull request #1543 from aaronschubert0/ASMapNode-Remove-Red-Herring
[ASMapNode] Remove assertion that checks calculatedSize rather than options.size.
2016-04-19 16:47:33 -07:00
Hannah Troisi
1ff07b2233 Changed comment for clarity. 2016-04-17 21:53:01 -07:00
Hannah Troisi
354b972e73 Renamed instance variable & improved comment per request 2016-04-17 20:45:50 -07:00
Aaron Schubert
5897c1e1b4 [ASMapNode] Remove false assert. This handles #1534 2016-04-16 13:19:07 +01:00
Hannah Troisi
c981aeb09d [ASMapNode] snapshot can be triggered before layout and cause exception (e.g. setAnnotations) 2016-04-14 23:05:35 -07:00
Scott Goodson
678c201dbc [ASLayout] Add additional validation step to intercept incorrect values in production and safely zero them out.
These conditions already had assertions, but at runtime, an insufficiently tested and incorrect ASLayoutSpec could
generate values that cause UIKit to enter an infinite loop (e.g. inside of UICollectionView layout validation).
2016-04-10 16:42:22 -07:00
Adlai Holler
fd159aa196 [ASMapNode] Never set invalid snapshot dimensions into MapKit 2016-04-04 16:42:51 -07:00
Scott Goodson
7bb48d266c [ASMapNode] Reduce number of MapKit calls to -cancel by using the .isLoading property. 2016-03-18 23:31:33 -07:00
Eric Jensen
17aebcbaba Add a space between the ? and : in ternarys 2016-03-17 10:38:51 -07:00
Adlai Holler
60f5ba2d17 Simplify ASMapNode.setAnnotations 2016-02-25 10:40:38 -08:00
Adlai Holler
2fbc7b0942 Make ASMapNode vend its annotations 2016-02-25 10:32:13 -08:00
Scott Goodson
792db0061b [ASMapNode] Perform MKMapSnapshotter callback off the main thread to eliminate UIImage handling overhead. 2016-02-24 17:02:22 -08:00
Adlai Holler
de46701ff7 [ASMapNode] Remove live map on clearFetchedData, not clearContents 2016-02-24 15:20:02 -08:00
Scott Goodson
82f7956bf9 [ASMapNode] Some improvements to layout logic and snapshot triggering. 2016-01-23 20:12:45 -08:00
Scott Goodson
28618f7238 Re-add .region property for API compatibility and convenience, using options object internally. 2016-01-23 16:52:39 -08:00
appleguy
eb7caa3ba6 Merge pull request #1036 from aaronschubert0/ASMapNode
[ASMapNode] now supports MKMapSnapshotOptions to specify map parameters
2016-01-23 12:37:51 -08:00
Aaron Schubert
cc4f604ea3 [tvOS] Initial commit to make build run. 2016-01-12 14:43:30 +00:00
Aaron Schubert
e8f5f61e3b [ASMapNode] Defer creation of default options till they are needed. 2016-01-11 19:42:34 +00:00
Aaron Schubert
45fa36eba5 ASMapNode now supports MKMapSnapshotOptions as opposed to just a region property. 2016-01-05 13:44:41 +00:00
Scott Goodson
a2cf2a88e6 Overhaul header files / includes to eliminate circular references that Xcode 7 is angry about. 2015-12-25 19:22:00 -08:00
Aaron Schubert
e35697d162 Greatly improve the internal logic of ASMapNode. Also fixes bug #971 2015-12-23 10:19:05 +00:00
Aaron Schubert
4ceab33038 Further clean up for ASDK 2.0 2015-12-16 10:20:13 +00:00
Aaron Schubert
50f652a5b3 Fix indendation 2015-12-14 10:22:37 +00:00
Aaron Schubert
1dfb8fac67 Changed init method, as well as further clean up to get ASMapNode ready for 2.0 2015-12-08 10:37:00 +00:00
Aaron Schubert
79b4c95749 Substantially improved ASMapNode and made it a lot clearer and less complex internally. 2015-12-03 11:22:05 +00:00
Aaron Schubert
863156b2dc Changed hasLiveMap to liveMap/isLiveMap. Removed internal action handler. Renamed ASDisplayNode liveMap to mapView to avoid naming confusion. 2015-11-16 13:48:21 +00:00
Aaron Schubert
46bf49cae7 Fix indentation 2015-11-12 12:18:09 +00:00
Aaron Schubert
fe06f211ca Added an ASMapNode to AsyncDisplayKit 2015-11-12 12:13:42 +00:00