概要
FaveButtonはSwiftで書かれた、かわいくアニメーションするiOS用「いいね」ボタンです。
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 0
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルFaveButton
Favorite Animated Button written in Swift

Requirements
- iOS 8.0+
- Xcode 9+
Installation
For manual instalation, drag Source folder into your project.
os use CocoaPod adding this line to you Podfile:
pod 'FaveButton'
for Carthage users, add this line to you Cartfile
github "janselv/fave-button"
Usage
With storyboard or xib files
Create a Button that inherits from
FaveButtonAdd Image for a
NormalstateSet the
IBOutletdelegate property to a subclass ofFaveButtonDelegateOptional manipulate porperties to change button settings
@IBInspectable public var normalColor: UIColor
@IBInspectable public var selectedColor: UIColor
@IBInspectable public var dotFirstColor: UIColor
@IBInspectable public var dotSecondColor: UIColor
@IBInspectable public var circleFromColor: UIColor
@IBInspectable public var circleToColor: UIColor
- Optional respond to delegate methods
func faveButton(faveButton: FaveButton, didSelected selected: Bool)
func faveButtonDotColors(faveButton: FaveButton) -> [DotColors]?
In Code
let faveButton = FaveButton(
frame: CGRect(x:200, y:200, width: 44, height: 44),
faveIconNormal: UIImage(named: "heart")
)
faveButton.delegate = self
view.addSubview(faveButton)
Manipulating dot colors
If you want differents colors for dots like Twitter’s Heart Animation use the delegate method for the button you want.
func faveButtonDotColors(_ faveButton: FaveButton) -> [DotColors]? {
if faveButton == myFaveButton{
// return dot colors
}
return nil
}
in FaveButtonDemo you will find a set of color to cause dots appear like this:

Credits
FaveButton was inspired by Twitter’s Like Heart Animation within their App
License
FaveButton is released under the MIT license.
関連プロジェクトを探す
読み込み中…