42 Commits

Author SHA1 Message Date
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