MyGit

marmelroy/TVButton

Fork: 51 Star: 1157 (更新于 2024-12-19 04:09:11)

license: MIT

Language: Swift .

Recreating the cool parallax icons from Apple TV as iOS UIButtons (in Swift).

最后发布版本: 1.0.0 ( 2016-12-04 14:36:26)

GitHub网址

TVButton - Apple TV Parallax icons on iOS

Build Status Version Carthage compatible

TVButton

Recreating the cool parallax icons from Apple TV as iOS UIButtons (in Swift). The effect is triggered by long pressing or dragging.

Star Wars TVButton

Usage

Import TVButton at the top of your Swift ViewController.

import TVButton

Create and position your TVButton in interface builder or in code.

For the parallax TVButton you will need at least two layers of images (three recommended). For best results, the button and the images should all have the same dimensions. Assign the relevant UIImages to TVButtonLayers and provide them as a layers array to the TVButton.

let background = TVButtonLayer(image: UIImage(named: "TVButtonBackground.png")!)
let pattern = TVButtonLayer(image: UIImage(named: "TVButtonPattern.png")!)
let top = TVButtonLayer(image: UIImage(named: "TVButtonTop.png")!)
tvButton.layers = [background, pattern, top]

You can customize the parallax intensity of your TVButton. Default value is 1.0 and it's very subtle. Maximum recommended value is 2.0.

tvButton.parallaxIntensity = 1.3

TVButton in action

Enjoy!

Setting up with CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
pod 'TVButton', '~> 1.0'

Setting up with Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate TVButton into your Xcode project using Carthage, specify it in your Cartfile:

github "marmelroy/TVButton"

最近版本更新:(数据更新于 2024-09-05 19:06:32)

2016-12-04 14:36:26 1.0.0

2015-11-12 15:29:20 0.1.5

2015-11-11 18:26:10 0.1.4

2015-11-10 19:37:13 0.1.3

2015-11-09 16:34:27 0.1.2

2015-11-08 18:10:12 0.1

marmelroy/TVButton同语言 Swift最近更新仓库

2024-12-21 13:48:53 argmaxinc/WhisperKit

2024-12-19 06:06:30 stripe/stripe-ios

2024-12-16 23:43:56 wordpress-mobile/WordPress-iOS

2024-12-04 20:33:05 Artificial-Pancreas/iAPS

2024-12-03 10:12:09 utmapp/UTM

2024-11-25 23:11:48 Alamofire/Alamofire