Latest 0.2.0
Homepage https://github.com/taketin/DieCast
License MIT Copyright (c) 2016 Hidenori TAKESHITA
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.
Platforms ios 8.0
Authors

Swift 3
Build Status
Carthage compatible

DieCast is a library for convert the material (e.g. number) to the image in Swift.

ScreenShot

2016-02-01 23 56 02

Installation

Carthage

  • Insert github "taketin/DieCast" ~> 0.1.1 to your Cartfile.
  • Run carthage update.
  • Link your app with DieCast.framework in Carthage/Build

CocoaPods

  • Insert pod 'DieCast', '~> 0.1.1' to your Podfile.
  • Run pod install

Usage

Look at Demo App. very easy.

if let diecast = DieCast(material: 1234567890) {
    let diecastView = diecast.press()
    view.addSubview(diecastView)
}

If you want to use your own images with Asset Catalog, Please follow.

(The numbers of the image, please put the file name from 0 to 9 after the prefix.)

if let diecast = DieCast(material: 1234567890, type: IntCast.Custom, filenamePrefix: "your_image_prefix_") {
    ...
}

Custom settings

  • magnification
  • height
  • margin

Please follow.

if let diecast = DieCast(material: 1234567890) {
    // setting to magnification of image.
    diecast.magnification = 0.06

    // setting to height of image, width will be the same ratio.
    // (magnification will be applied in priority.)
    diecast.height = 50

    // setting to margin of each images.
    diecast.margin = 5.0

    let diecastView = diecast.press()
    view.addSubview(diecastView)
}

License

DieCast is released under the MIT license.

Latest podspec

{
    "name": "DieCast",
    "version": "0.2.0",
    "summary": "A convert the material (e.g. number) to the image library written in Swift.",
    "homepage": "https://github.com/taketin/DieCast",
    "license": {
        "type": "MIT",
        "text": "      Copyright (c) 2016 Hidenori TAKESHITAn      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:n      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.n      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.n"
    },
    "authors": {
        "Hidenori TAKESHITA": "[email protected]"
    },
    "social_media_url": "https://twitter.com/taketin",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/taketin/DieCast.git",
        "tag": "0.2.0"
    },
    "source_files": "DieCast/*.swift",
    "resources": "DieCast/Images.xcassets",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This