forked from onurersel/anim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored tvOS example with proper assets.
- Loading branch information
Showing
37 changed files
with
151 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0 | ||
4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+3 Bytes
(100%)
... Icon.imagestack/Back 1.imagestacklayer/Content.imageset/tvos-appIcon-back1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-562 Bytes
(83%)
...on.imagestack/Back 1.imagestacklayer/Content.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-248 Bytes
(84%)
... Icon.imagestack/Back 2.imagestacklayer/Content.imageset/tvos-appIcon-back2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-541 Bytes
(81%)
...on.imagestack/Back 2.imagestacklayer/Content.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-107 Bytes
(89%)
... Icon.imagestack/Back 3.imagestacklayer/Content.imageset/tvos-appIcon-back3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-31 Bytes
(98%)
...on.imagestack/Back 3.imagestacklayer/Content.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-35 Bytes
(97%)
...con.imagestack/Front 1.imagestacklayer/Content.imageset/tvos-appIcon-front1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-78 Bytes
(97%)
....imagestack/Front 1.imagestacklayer/Content.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-306 Bytes
(86%)
...s/App Icon.imagestack/Mid.imagestacklayer/Content.imageset/tvos-appIcon-mid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-224 Bytes
(94%)
...pp Icon.imagestack/Mid.imagestacklayer/Content.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "circle_red-tv.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
|
Binary file added
BIN
+4.45 KB
examples/bonfire/Assets-bonfire.xcassets/circle_red.imageset/circle_red-tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.58 KB
examples/bonfire/Assets-bonfire.xcassets/circle_red.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "particle_red-tv.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
|
Binary file added
BIN
+836 Bytes
examples/bonfire/Assets-bonfire.xcassets/particle_red.imageset/particle_red-tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.4 KB
...es/bonfire/Assets-bonfire.xcassets/particle_red.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "particle_yellow-tv.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
|
Binary file added
BIN
+983 Bytes
...bonfire/Assets-bonfire.xcassets/particle_yellow.imageset/particle_yellow-tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.64 KB
...fire/Assets-bonfire.xcassets/particle_yellow.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "rect_orange-tv.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
|
Binary file added
BIN
+4.43 KB
examples/bonfire/Assets-bonfire.xcassets/rect_orange.imageset/rect_orange-tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.09 KB
...ples/bonfire/Assets-bonfire.xcassets/rect_orange.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "rect_red-tv.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
|
Binary file added
BIN
+4.43 KB
examples/bonfire/Assets-bonfire.xcassets/rect_red.imageset/rect_red-tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.09 KB
examples/bonfire/Assets-bonfire.xcassets/rect_red.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "rect_yellow-tv.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
|
Binary file added
BIN
+4.43 KB
examples/bonfire/Assets-bonfire.xcassets/rect_yellow.imageset/rect_yellow-tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.09 KB
...ples/bonfire/Assets-bonfire.xcassets/rect_yellow.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,16 @@ | |
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "wood-tv.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "tv", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.4 KB
examples/bonfire/Assets-bonfire.xcassets/wood.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// | ||
// DistanceExtension.swift | ||
// anim | ||
// | ||
// Created by Onur Ersel on 2017-09-29. | ||
// Copyright © 2017 Onur Ersel. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
enum PlatformScale: CGFloat { | ||
case iOS = 1 | ||
case tvOS = 3 | ||
|
||
static var valueForPlatform: PlatformScale { | ||
#if os(tvOS) | ||
return self.tvOS | ||
#else | ||
return self.iOS | ||
#endif | ||
} | ||
} | ||
|
||
extension Double { | ||
var platform: CGFloat { | ||
return CGFloat(self) * PlatformScale.valueForPlatform.rawValue | ||
} | ||
} | ||
|
||
extension Float { | ||
var platform: CGFloat { | ||
return CGFloat(self) * PlatformScale.valueForPlatform.rawValue | ||
} | ||
} | ||
|
||
extension CGFloat { | ||
var platform: CGFloat { | ||
return self * PlatformScale.valueForPlatform.rawValue | ||
} | ||
} | ||
|
||
extension Int { | ||
var platform: CGFloat { | ||
return CGFloat(self) * PlatformScale.valueForPlatform.rawValue | ||
} | ||
} | ||
|
||
extension CGSize { | ||
var platform: CGSize { | ||
return CGSize(width: self.width.platform, height: self.height.platform) | ||
} | ||
} | ||
|
||
extension DoubleRange { | ||
var platform: DoubleRange { | ||
return DoubleRange(min: Double(self.min.platform), max: Double(self.max.platform)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters