LoveButton 1.0.0

LoveButton 1.0.0

Abedalkareem维护。



Facebook Buy Me A Coffee Youtube Twitter


爱心按钮是一种自定义按钮,点击时发射图像。

屏幕快照

用法

在界面构建器中,转到身份检查器,将自定义类设置为LoveButton

然后转到属性检查器,并设置loveImageunLoveImageloveColorunLoveColor

-在类中,只需将isLoved更改为true以显示动画,(请记住为isLoved添加默认值)

  // love button IBOutlet
  @IBOutlet weak var btnLove: LoveButton!
    
  override func viewDidLoad() {
    super.viewDidLoad()
     
    // set defult value
    btnLove.isLoved = false
        
  }

  @IBAction func love(_ sender: LoveButton) {
    // change the value to true to show the animted hearts !.
    sender.isLoved = true
  }

安装

LoveButton可通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中:

pod 'LoveButton'

支持我🚀

您可以通过以下方式支持此项目:

1- 检查我的 应用
2- 给仓库加星。
3- 与朋友分享此仓库。
赞助我一杯咖啡

关注我❤️

Facebook | Twitter | Instagram | Youtube

The MIT License (MIT)

Copyright (c) 2017 Abedalkareem

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.