Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
osx_image: xcode7.1
osx_image: xcode8.1
language: objective-c
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
before_install:
- brew update || brew update
- brew outdated xctool || brew upgrade xctool
- gem install cocoapods
- gem install cocoapods --pre
- xcrun simctl list
install: echo "<3"
env:
Expand All @@ -18,4 +16,4 @@ script: ./build.sh $MODE
# whitelist
branches:
only:
- master
- master
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ You can customize the parallax intensity of your TVButton. Default value is 1.0
tvButton.parallaxIntensity = 1.3
```

If you want to keep the image proportions
```swift
tvButton.saveAspect= true
```

For custom specular image set UIImage to
```swift
tvButton.customSpecularImage
```

![TVButton in action](http://i.giphy.com/l0O9zc8b49oDi209y.gif)

Enjoy!
Expand Down
47 changes: 15 additions & 32 deletions TVButton.podspec
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
#
# Be sure to run `pod lib lint TVButton.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
s.name = "TVButton"
s.version = "0.1.5"
s.summary = "Apple TV style parallax icons as iOS UIButtons"
s.name = 'TVButton'
s.version = '0.1.8'
s.summary = 'Apple TV style parallax icons as iOS UIButtons'

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
Recreating the cool parallax icons from Apple TV as iOS UIButtons (in Swift).
DESC
s.description = <<-DESC
Recreating the cool parallax icons from Apple TV as iOS UIButtons (in Swift).
DESC

s.homepage = "https://github.com/marmelroy/TVButton"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "Roy Marmelstein" => "marmelroy@gmail.com" }
s.source = { :git => "https://github.com/marmelroy/TVButton.git", :tag => s.version.to_s }
s.social_media_url = "http://twitter.com/marmelroy"
s.homepage = 'https://github.com/marmelroy/TVButton'
s.license = 'MIT'
s.author = { 'Roy Marmelstein' => 'marmelroy@gmail.com' }
s.source = { :git => 'https://github.com/BOOMik/TVButton.git', :tag => s.version.to_s }
s.social_media_url = "http://twitter.com/marmelroy"

s.platform = :ios, '8.0'
s.requires_arc = true
s.platform = :ios,'8.0'

s.source_files = "TVButton"
s.resources = "TVButton/Specular.png"
s.source_files = "TVButton"
s.resources = "TVButton/Specular.png"

# s.public_header_files = 'Pod/Classes/**/*.h'
# s.dependency 'AFNetworking', '~> 2.3'
end
end
28 changes: 10 additions & 18 deletions TVButton.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/* Begin PBXBuildFile section */
342AA0901BEEBE6F00B1A7D9 /* TVButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 342AA08F1BEEBE6F00B1A7D9 /* TVButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
342AA0971BEEBE6F00B1A7D9 /* TVButton.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 342AA08C1BEEBE6F00B1A7D9 /* TVButton.framework */; };
342AA09C1BEEBE6F00B1A7D9 /* TVButtonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 342AA09B1BEEBE6F00B1A7D9 /* TVButtonTests.swift */; };
342AA0A71BEEBF6E00B1A7D9 /* TVButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 342AA0A61BEEBF6E00B1A7D9 /* TVButton.swift */; };
342AA0A91BEEBF7500B1A7D9 /* Specular.png in Resources */ = {isa = PBXBuildFile; fileRef = 342AA0A81BEEBF7500B1A7D9 /* Specular.png */; };
34F374BE1BF1B0890085BE13 /* TVButtonAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F374BD1BF1B0890085BE13 /* TVButtonAnimation.swift */; };
Expand All @@ -31,8 +30,6 @@
342AA08F1BEEBE6F00B1A7D9 /* TVButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TVButton.h; sourceTree = "<group>"; };
342AA0911BEEBE6F00B1A7D9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
342AA0961BEEBE6F00B1A7D9 /* TVButtonTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TVButtonTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
342AA09B1BEEBE6F00B1A7D9 /* TVButtonTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TVButtonTests.swift; sourceTree = "<group>"; };
342AA09D1BEEBE6F00B1A7D9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
342AA0A61BEEBF6E00B1A7D9 /* TVButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TVButton.swift; sourceTree = "<group>"; };
342AA0A81BEEBF7500B1A7D9 /* Specular.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Specular.png; sourceTree = "<group>"; };
34F374BD1BF1B0890085BE13 /* TVButtonAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TVButtonAnimation.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -62,7 +59,6 @@
isa = PBXGroup;
children = (
342AA08E1BEEBE6F00B1A7D9 /* TVButton */,
342AA09A1BEEBE6F00B1A7D9 /* TVButtonTests */,
342AA08D1BEEBE6F00B1A7D9 /* Products */,
);
sourceTree = "<group>";
Expand All @@ -87,15 +83,6 @@
path = TVButton;
sourceTree = "<group>";
};
342AA09A1BEEBE6F00B1A7D9 /* TVButtonTests */ = {
isa = PBXGroup;
children = (
342AA09B1BEEBE6F00B1A7D9 /* TVButtonTests.swift */,
342AA09D1BEEBE6F00B1A7D9 /* Info.plist */,
);
path = TVButtonTests;
sourceTree = "<group>";
};
34F374CE1BF1B7EE0085BE13 /* Sources */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -176,9 +163,11 @@
TargetAttributes = {
342AA08B1BEEBE6F00B1A7D9 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0820;
};
342AA0951BEEBE6F00B1A7D9 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0820;
};
};
};
Expand Down Expand Up @@ -233,7 +222,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
342AA09C1BEEBE6F00B1A7D9 /* TVButtonTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -285,7 +273,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -327,7 +315,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -347,12 +335,13 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = TVButton/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.TVButton;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -366,11 +355,12 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = TVButton/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.TVButton;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -381,6 +371,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.TVButtonTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -391,6 +382,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.TVButtonTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
6 changes: 4 additions & 2 deletions TVButton/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.5</string>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>17</string>
<key>NSPrincipalClass</key>
<string></string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
Loading