- Swift4.0
- iOS 11
- Only you have to do is to import files under your project file.
Extensions of String class
var url: URL? { get }
func convertAlphabetsInfoIntoUpperCase() -> Void
convertAlphabetsIntoLowerCase() -> Void
Extension of NSObject class
var className: String { get }
var className: String { get }
Extension of UIView class
func removeAllSubview() -> Void
Extension of UIImage class
func resize(ratio: CGFloat) -> UIImage
Extension of UIColor class
init(_ hex: Int, _ alpha: CGFloat)
hex: hexadecimal color codeAlpha: optional argument
Extension of UIViewController class
var boundsWidth: CGFloat { get }
var boundsHeight: CGFloat { get }
var screenWidth: CGFloat { get }
var screenHeight: CGFloat { get }
func removeAllSubviewOf(_ parentView: UIView)
func removeAllSubview()
Extension of SCNVector3 class in SceneKit
var magnitude: Float { get }
var normalized: SCNVector3 { get }
func distance(_ vector: SCNVector3) -> Float
func distance_squared(_ vector: SCNVector) -> Float
func cross(_ vector: SCNVector3) -> SCNVector3
func dot(_ vector: SCNVector3) -> Float
static func zero() -> SCNVector3
static func magnitude(_ vector: SCNVector3) -> Float
static func normalized(_ vector: SCNVector3) -> SCNVector3
static func distance(_ lhs: SCNVector3, _ rhs: SCNVector3) -> Float
static func distance_squared(_ lhs: SCNVector3, _ rhs: SCNVector3) -> Float
static func cross(_ lhs: SCNVector3, _ rhs: SCNVector3) -> SCNVector3
static func dot(_ lhs: SCNVector3, _ rhs: SCNVector3) -> Float
+, -, *, /, +=, -=, *=, /=,
<, >, <=, >=
==, !=
===, !==
Custom helper class
static var pi: Double { get }
static func randomNumber(_ min: Float, _ max: Float) -> Float
static func random0To1() -> Float
static func radomInt(_ min: Float, _ max: Float) -> Int
static func mapBetween0To1(_ value: Float, min: Float, max: Float) -> Float
The MIT License (MIT) Copyright (c) 2017 Yota Odaka
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.