测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2017年11月 |
SwiftSwift 版本 | 4.0 |
SPM支持 SPM | ✗ |
由 Antonio Zaitoun 维护。
一种创建美丽社交认证按钮的简单方法
pod 'EasySocialButton'
将 AZSocialButton.swift
拖放到您的项目中。
简单地添加一个 UIButton,然后在 Identity Inspector 中将类更改为 AZSocialButton
。
let socialButton = AZSocialButton(frame: CGRect(x: 20, y: 20, width: 200, height: 40))
socialButton.animateInteraction = true
socialButton.useCornerRadius = true
socialButton.cornerRadius = 5
socialButton.highlightOnTouch = false
socialButton.image = #imageLiteral(resourceName: "ic_google")
socialButton.setTitle("Sign in with Google", for: [])
socialButton.setTitleColor(.black, for: [])
socialButton.titleLabel?.font = UIFont.systemFont(ofSize: 15)
socialButton.onClickAction = { (button) in
print("do social login stuff")
}
view.addSubview(socialButton)