All Projects → goktugyil → Ezswiftextensions

goktugyil / Ezswiftextensions

Licence: mit
😏 How Swift standard types and classes were supposed to work.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Ezswiftextensions

Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (-85.54%)
Mutual labels:  cocoapods, carthage, uikit
Faceaware
An extension that gives UIImageView the ability to focus on faces within an image.
Stars: ✭ 3,004 (+3.19%)
Mutual labels:  extension, cocoapods, carthage
Hokusai
A Swift library to provide a bouncy action sheet
Stars: ✭ 431 (-85.19%)
Mutual labels:  cocoapods, carthage, uikit
Stepslider
StepSlider its custom implementation of slider such as UISlider for preset integer values.
Stars: ✭ 391 (-86.57%)
Mutual labels:  cocoapods, carthage, uikit
Bfkit Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Stars: ✭ 963 (-66.92%)
Mutual labels:  cocoapods, carthage, uikit
Watchdoginspector
Shows your current framerate (fps) in the status bar of your iOS app
Stars: ✭ 497 (-82.93%)
Mutual labels:  cocoapods, carthage, uikit
Alertift
Swifty, modern UIAlertController wrapper.
Stars: ✭ 242 (-91.69%)
Mutual labels:  cocoapods, carthage, uikit
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (-72.21%)
Mutual labels:  cocoapods, carthage, uikit
Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (-69.87%)
Mutual labels:  cocoapods, carthage, uikit
Bfkit
BFKit is a collection of useful classes and categories to develop Apps faster.
Stars: ✭ 811 (-72.14%)
Mutual labels:  cocoapods, carthage, uikit
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+267.78%)
Mutual labels:  cocoapods, carthage, uikit
Tkrubberindicator
A rubber animation pagecontrol
Stars: ✭ 1,337 (-54.07%)
Mutual labels:  cocoapods, carthage, uikit
Swiftlyext
SwiftlyExt is a collection of useful extensions for Swift 3 standard classes and types 🚀
Stars: ✭ 31 (-98.94%)
Mutual labels:  extension, cocoapods, carthage
Simplecheckbox
A simple Checkbox
Stars: ✭ 253 (-91.31%)
Mutual labels:  cocoapods, carthage
Wechatkit
一款快速实现微信第三方登录的框架(Swift版) SDK 1.8.5
Stars: ✭ 249 (-91.45%)
Mutual labels:  cocoapods, carthage
Localize
Localize is a framework writed in swift to localize your projects easier improves i18n, including storyboards and strings.
Stars: ✭ 253 (-91.31%)
Mutual labels:  cocoapods, carthage
Datez
📆 Breeze through Date, DateComponents, and TimeInterval with Swift!
Stars: ✭ 254 (-91.27%)
Mutual labels:  cocoapods, carthage
Harpy
Harpy checks a user's currently installed version of your iOS app against the version that is currently available in the App Store. If a new version is available, an alert can be presented to the user informing them of the newer version, and giving them the option to update the application.
Stars: ✭ 2,619 (-10.03%)
Mutual labels:  cocoapods, carthage
Colorizeswift
Terminal string styling for Swift.
Stars: ✭ 253 (-91.31%)
Mutual labels:  cocoapods, carthage
Swiftytexttable
A lightweight library for generating text tables.
Stars: ✭ 252 (-91.34%)
Mutual labels:  cocoapods, carthage

EZSwiftExtensions

Carthage compatible CocoaPods Compatible
License Platform Language Language Language

Build Status codecov.io MIT

How Swift standard types and classes were supposed to work. A collection of useful extensions for the Swift Standard Library, Foundation, and UIKit.

Join our online chat at Gitter

Example Usage

Easily get an object at a specified index:

var myArray = ["charmander","bulbasaur","squirtle"]
print(myArray.get(1)) // "bulbasaur"

Easily access a random element:

var myArray = ["charmander","bulbasaur","squirtle"]
print(myArray.random()) // bulbasaur or something else

Easily find the indexes of an object:

var myArray = ["charmander","bulbasaur","squirtle","charmander"]
print(myArray.indexesOf("charmander")) // [0,3]

Easily check if an array contains another array:

var myArray = ["charmander","bulbasaur","squirtle"]
print(myArray.containsArray(["charmander","bulbasaur"])) // true
print(myArray.containsArray(["string"])) // false

Block Objects These objects use completion blocks instead of selectors, taken from: CEMKit-Swift Easily initialize a BlockButton:

let button = BlockButton(x: 0, y: 0, w: 100, h: 100) { (sender) -> Void in
    print("Block button clicked!")
}
let button1 = BlockButton(x: 0, y: 0, w: 100, h: 100)
button1.addAction { (sender) -> Void in
    print("Block button clicked!")
}

// There are also BlockWebView, BlockTap, BlockPan, BlockSwipe, BlockPinch, BlockLongPress

Easily convert between different types:

var myCGFloat = myInt.toCGFloat
var myString = myInt.toString
var myDouble = myString.toDouble
var myInt = myDouble.toInt

Easily toggle it:

var myBool: Bool = true
print(myBool.toggle()) // false

Easily initialize your objects:

let myView = UIView(x: 0, y: 0, w: 100, h: 100)
print(myView.frame) // (0.0, 0.0, 100.0, 100.0)

Easily access your ViewController on top of your view stack:

ez.topMostViewController?.presentViewController(myAlertController, animated: true, completion: nil)
// topMostViewController is your rootViewController
// Intended for showing small VCs like UIAlertControllerstring.length, string.capitalizefirst, string.trim, string.isemail, 

Easily initialize your colors:

let myColor = UIColor(r: 100, g: 100, b: 100) // Default alpha is 1

Easily run block of codes after a certain delay:

Timer.runThisAfterDelay(seconds: 2) { () -> () in
    print("Prints this 2 seconds later in main queue")
}

Easily run code every seconds:

var count = 0
Timer.runThisEvery(seconds: 1) { (timer) -> Void in
    print("Will print every second")
    if count == 3 {
        timer?.invalidate()
    }
    count += 1
}

Easily access your projects version and build numbers:

print(ez.appVersion) // 0.3
print(ez.appBuild) // 7
print(ez.appVersionAndBuild) // v0.3(7)

Easily track screen shots:
ez.detectScreenShot { () -> () in
    print("User took a screen shot")
}

Installation

Manually (~10 seconds)

  1. Download and drop '/Sources' in your project.
  2. Congratulations!

Install via CocoaPods (~10 seconds)

You can use CocoaPods to install EZSwiftExtensions by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'EZSwiftExtensions' #Stable release for Swift 3.0

pod 'EZSwiftExtensions', :git => 'https://github.com/goktugyil/EZSwiftExtensions.git' #Latest release for Swift 3.0
pod 'EZSwiftExtensions', :git => 'https://github.com/goktugyil/EZSwiftExtensions.git', :branch => 'Swift2.3' #For Swift 2.3
pod 'EZSwiftExtensions', '~> 1.6' #For Swift 2.2

To get the full benefits import EZSwiftExtensions wherever you import UIKit

import UIKit
import EZSwiftExtensions

Install via Carthage

Create a Cartfile that lists the framework and run carthage bootstrap. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/EZSwiftExtensions.framework to an iOS project.

github "goktugyil/EZSwiftExtensions"

Requirements

  • Swift 2 or later

Possible features

  • More extensions! Please if there is an extension you are constantly using, send a pull request now!
  • Fancy pictures and jpgs in documentation.
  • Documentations inside code
  • List of contents inside readme
  • Completing TODOs in source code.
  • OSX compatibility and add here https://github.com/AndrewSB/awesome-osx

Sources Used

And countless gists and stackoverflow answers.

License

EZSwiftExtensions is available under the MIT license. See the LICENSE file.

Keywords

swift, extension, uikit, exswift, foundation, library, framework, tool

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].