From ab7203af58387e2e5c7a9f82d2fba2e092c2a868 Mon Sep 17 00:00:00 2001 From: David Cordero Date: Mon, 5 Jun 2017 22:49:29 -0700 Subject: [PATCH 1/2] Define device of the gloweffect asset as tvOS --- .../gloweffect.imageset/Contents.json | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Resources/Assets.xcassets/gloweffect.imageset/Contents.json b/Resources/Assets.xcassets/gloweffect.imageset/Contents.json index 185c299..41c38eb 100644 --- a/Resources/Assets.xcassets/gloweffect.imageset/Contents.json +++ b/Resources/Assets.xcassets/gloweffect.imageset/Contents.json @@ -1,17 +1,9 @@ { "images" : [ { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", + "idiom" : "tv", "filename" : "gloweffect.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" + "scale" : "1x" } ], "info" : { From f38b33953fff38171dae3eb4053b5f311674b093 Mon Sep 17 00:00:00 2001 From: David Cordero Date: Mon, 5 Jun 2017 22:51:24 -0700 Subject: [PATCH 2/2] Fix deprecated use of M_PI_4. Using Double.pi/4 instead --- Example-tvOS/ParallaxViewExample/CollectionViewCell.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Example-tvOS/ParallaxViewExample/CollectionViewCell.swift b/Example-tvOS/ParallaxViewExample/CollectionViewCell.swift index 987e4be..bc3cfa7 100644 --- a/Example-tvOS/ParallaxViewExample/CollectionViewCell.swift +++ b/Example-tvOS/ParallaxViewExample/CollectionViewCell.swift @@ -21,8 +21,8 @@ class CollectionViewCell: ParallaxCollectionViewCell { parallaxEffectOptions.glowAlpha = 0.4 parallaxEffectOptions.shadowPanDeviation = 10 - parallaxEffectOptions.parallaxMotionEffect.viewingAngleX = CGFloat(M_PI_4/30) - parallaxEffectOptions.parallaxMotionEffect.viewingAngleY = CGFloat(M_PI_4/30) + parallaxEffectOptions.parallaxMotionEffect.viewingAngleX = CGFloat(Double.pi/4/30) + parallaxEffectOptions.parallaxMotionEffect.viewingAngleY = CGFloat(Double.pi/4/30) parallaxEffectOptions.parallaxMotionEffect.panValue = CGFloat(5) // You can customise parallax view standard behaviours using parallaxViewActions property.