Skip to content

Commit 81aaf94

Browse files
authored
Merge pull request #123 from sunshinejr/example-swift-asvideonode
[ASVideoNode/ASMapNode] Update Swift examples.
2 parents d10d796 + cd56d7e commit 81aaf94

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/_docs/map-node.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Let's say you'd like to show a snapshot of San Francisco. All you need are the
1818
<div class = "code">
1919
<pre lang="objc" class="objcCode">
2020
ASMapNode *mapNode = [[ASMapNode alloc] init];
21-
mapNode.preferredFrameSize = CGSizeMake(300.0, 300.0);
21+
mapNode.style.preferredSize = CGSizeMake(300.0, 300.0);
2222

2323
// San Francisco
2424
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(37.7749, -122.4194);
@@ -29,7 +29,7 @@ mapNode.region = MKCoordinateRegionMakeWithDistance(coord, 20000, 20000);
2929

3030
<pre lang="swift" class = "swiftCode hidden">
3131
let mapNode = ASMapNode()
32-
mapNode.preferredFrameSize = CGSize(width: 300.0, height: 300.0)
32+
mapNode.style.preferredSize = CGSize(width: 300.0, height: 300.0)
3333

3434
// San Francisco
3535
let coord = CLLocationCoordinate2DMake(37.7749, -122.4194)
@@ -71,7 +71,7 @@ mapNode.options = options;
7171
</pre>
7272
<pre lang="swift" class = "swiftCode hidden">
7373
let options = MKMapSnapshotOptions()
74-
options.mapType = .Satellite
74+
options.mapType = .satellite
7575
options.region = MKCoordinateRegionMakeWithDistance(coord, 20000, 20000)
7676

7777
mapNode.options = options

docs/_docs/video-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ videoNode.asset = asset;
2828
<pre lang="swift" class = "swiftCode hidden">
2929
let videoNode = ASVideoNode()
3030

31-
let asset = AVAsset(URL: NSURL(string: "http://www.w3schools.com/html/mov_bbb.mp4"))
31+
let asset = AVAsset(url: URL(string: "http://www.w3schools.com/html/mov_bbb.mp4")!)
3232
videoNode.asset = asset
3333
</pre>
3434
</div>
@@ -78,7 +78,7 @@ There are a ton of delegate methods available to you that allow you to react to
7878
- (void)videoNode:(ASVideoNode *)videoNode willChangePlayerState:(ASVideoNodePlayerState)state toState:(ASVideoNodePlayerState)toState;
7979
</pre>
8080
<pre lang="swift" class = "swiftCode hidden">
81-
videoNode(videoNode:willChangePlayerState:toState:)
81+
videoNode(_:willChange:to:)
8282
</pre>
8383
</div>
8484
</div>

0 commit comments

Comments
 (0)