This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public extension UIImage { | |
public static func image(path: UIBezierPath, fillcolor color: UIColor) -> UIImage { | |
return UIGraphicsImageRenderer(bounds: path.bounds).image { _ in | |
color.setFill() | |
path.fill() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// バージョン番号のラッパ | |
public struct VersionNumber: Comparable, | |
ExpressibleByStringLiteral, | |
CustomStringConvertible, | |
CustomDebugStringConvertible { | |
/// メジャーバージョン番号 | |
public let major: Int | |
/// マイナーバージョン番号 | |
public let minor: Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DeviceVersion.swift | |
// cw-mwd-iphone | |
// | |
// Created by 小清水健人 on 2014/10/07. | |
// | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UILabel+Extra.swift | |
// cw-mwd-iphone | |
// | |
// Created by 小清水健人 on 2014/10/13. | |
// | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import CoreText | |
/** | |
ヒラギノフォントで日本語に英語を混ぜると正しく表示できなるCoreTextのバグ対策のためのラベル | |
*/ | |
class HirakakuLabel: UILabel { | |
private var ctFont: CTFont! { | |
return CTFontCreateWithName((font.fontName) as CFStringRef, font.pointSize, nil) |