Swift Package Index


CGFloat(10) becomes 10.f


  • The latest stable release is 0.5.0. Released almost 2 years ago.
  • The last commit to master was almost 2 years ago.

Swift Version Compatibility

  • 0.5.0 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.5.0 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

CGFloatLiteral

Swift Build Status CocoaPods Carthage compatible

Simple CGFloat initializer.

At a Glance

let imageViewTop = 15.f

imageViewTop is now a CGFloat.

Installation

  • For iOS 8+ projects with CocoaPods:

    pod 'CGFloatLiteral', '~> 0.2'
    
  • For iOS 8+ projects with Carthage:

    github "devxoul/CGFloatLiteral" ~> 0.2
    
  • For iOS 7 projects with CocoaSeeds:

    github 'devxoul/CGFloatLiteral', '0.2.0', :files => 'Sources/*.swift'
    
  • Using Swift Package Manager:

    import PackageDescription
    
    let package = Package(
        name: "MyAwesomeApp",
        dependencies: [
            .Package(url: "https://github.com/devxoul/CGFloatLiteral", "0.2.0"),
        ]
    )
    

License

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