转载

[iOS] Translucid:文本内嵌图片实现独特、酷炫动画文本组件

[iOS] Translucid:文本内嵌图片实现独特、酷炫动画文本组件

Simple and light weight UIView that animate text with an image.

Demo

[iOS] Translucid:文本内嵌图片实现独特、酷炫动画文本组件

Installation

CocoaPods

Translucid is available through CocoaPods . To install it, simply add the following line to your Podfile:

pod "Translucid", '~> 0.0.1'

Usage

override func loadView() {         super.loadView()          let starWars: Translucid = Translucid(frame: self.view.bounds)         starWars.font = UIFont(name: "Starjedi", size: 20)!         starWars.text = "Star Wars"         starWars.backgroundImage = UIImage(named: "stars")          self.view.addSubview(starWars)          starWars.animate()     }

Author

Lucas Ortis:

  • me@lucas-ortis.com
  • @LucasEkhoo
  • Linkedin

License

Translucid is available under the MIT license. See the LICENSE file for more info.

原文  https://github.com/Ekhoo/Translucid
正文到此结束
Loading...