CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

ExtensionKit 1.0.3

ExtensionKit 1.0.3

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2015
SPMSupports SPM

Maintained by Alex Zarochintsev.



ExtensionKit

License MIT Build Status

Swift extension for ios app.

Features

Extension for String

/// Converts a string into a url
var url: NSURL? { get }
/// The number of Unicode characters in the receiver
var length: Int { get }
/// Is valid email address
var isValidEmail: Bool { get }

Extension for Double

/// Meters
var m: Double { get }
/// Kilometers to meters
var km: Double { get }
/// Centimeters to meters
var cm: Double { get }
/// Millimeters to meters
var mm: Double { get }
/// Pounds to meters
var ft: Double { get }

Extension for NSURL

/// Return string url
var string: String { get }

/// Open url in safari
func openWebsiteInSafari() -> Bool

Extension for NSMutableArray

/// Moved object at index to index
func moveObjectAtIndex(index: Int, toIndex: Int) -> Bool

Extension for UIAlertView

/// Show alert with title
class func showWithTitle(title: String)
/// Show alert with message
class func showWithMessage(message: String)
/// Show alert with title and message
class func showWithTitle(title: String, message: String)
/// Show alert with title, message and cancel button title
class func showWithTitle(title: String?, message: String?, cancelButtonTitle: String)

Extension for UIScreen

/// Is retina screen
var isRetina: Bool { get }

Extension for UIApplication

/// App build version
var buildVersion: String? { get }
/// App version
var appVersion: String? { get }

Extension for UIColor

/// Returns random color with alpha 1.0
class func randomColor() -> UIColor
/// Returns random color with custom alpha
class func randomColorWithAlpha(alpha: CGFloat) -> UIColor

Authors

License

This code is distributed under the terms and conditions of the MIT license.