{"id":2996,"url":"https://github.com/Esqarrouth/EZSwiftExtensions","last_synced_at":"2025-08-03T12:31:53.945Z","repository":{"id":41055356,"uuid":"46181416","full_name":"Esqarrouth/EZSwiftExtensions","owner":"Esqarrouth","description":":smirk: How Swift standard types and classes were supposed to work.","archived":false,"fork":false,"pushed_at":"2024-04-05T13:43:05.000Z","size":1385,"stargazers_count":2999,"open_issues_count":34,"forks_count":381,"subscribers_count":85,"default_branch":"master","last_synced_at":"2024-11-29T03:49:42.139Z","etag":null,"topics":["carthage","cocoapods","exswift","extension","swift","swift-extensions","uikit"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Esqarrouth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-11-14T16:10:25.000Z","updated_at":"2024-11-26T22:32:12.000Z","dependencies_parsed_at":"2024-01-05T20:21:38.595Z","dependency_job_id":"b0d48720-60c9-4bc8-ab51-2495b63ab316","html_url":"https://github.com/Esqarrouth/EZSwiftExtensions","commit_stats":{"total_commits":645,"total_committers":68,"mean_commits":9.485294117647058,"dds":0.6666666666666667,"last_synced_commit":"761abf1a568e5a244b78e7796e7d4b1d1ada20dc"},"previous_names":["goktugyil/ezswiftextensions"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esqarrouth%2FEZSwiftExtensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esqarrouth%2FEZSwiftExtensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esqarrouth%2FEZSwiftExtensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esqarrouth%2FEZSwiftExtensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Esqarrouth","download_url":"https://codeload.github.com/Esqarrouth/EZSwiftExtensions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228312180,"owners_count":17900217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage","cocoapods","exswift","extension","swift","swift-extensions","uikit"],"created_at":"2024-01-05T20:16:28.502Z","updated_at":"2024-12-07T00:31:10.517Z","avatar_url":"https://github.com/Esqarrouth.png","language":"Swift","funding_links":[],"categories":["Utility","Libs","Swift","Recently Updated","Utilities and Extensions"],"sub_categories":["Web View","Utility","[Feb 27, 2024](/content/2024/02/27/README.md)"],"readme":"# EZSwiftExtensions\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg)](https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg)  \n[![License](https://img.shields.io/cocoapods/l/EZSwiftExtensions.svg?style=flat)](https://cocoapods.org/pods/EZSwiftExtensions)\n[![Platform](https://img.shields.io/cocoapods/p/EZSwiftExtensions.svg?style=flat)](http://cocoapods.org/pods/EZSwiftExtensions)\n[![Language](https://img.shields.io/badge/swift-4.0-orange.svg)](http://swift.org)\n[![Language](https://img.shields.io/badge/swift-3.0-orange.svg)](http://swift.org)\n[![Language](https://img.shields.io/badge/swift-2.3-orange.svg)](http://swift.org)\n\n\u003cp\u003e\n\u003ca href=\"http://cocoapods.org/pods/EZSwiftExtensions\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/at/EZSwiftExtensions.svg?label=Apps%20Using%20EZSwiftExtensions\u0026colorB=28B9FE\"\u003e\u003c/a\u003e\n\u003ca href=\"http://cocoapods.org/pods/EZSwiftExtensions\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/dt/EZSwiftExtensions.svg?label=Total%20Downloads\u0026colorB=28B9FE\"\u003e\u003c/a\u003e\n\u003ca href=\"http://cocoapods.org/pods/EZSwiftExtensions\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/dm/EZSwiftExtensions.svg?label=Downloads\u0026colorB=28B9FE\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[![Build Status](https://travis-ci.org/goktugyil/EZSwiftExtensions.svg?branch=master)](https://travis-ci.org/goktugyil/EZSwiftExtensions)\n[![codecov.io](https://codecov.io/gh/goktugyil/EZSwiftExtensions/branch/master/graphs/badge.svg)](https://codecov.io/gh/goktugyil/EZSwiftExtensions/branch/master)\n[![MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)\n\n\u003cimg src=\"charizard.png\" width=\"200\"\u003e\n\nHow Swift standard types and classes were supposed to work. A collection of useful extensions for the Swift Standard Library, Foundation, and UIKit.\n\nJoin our online chat at [![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/EZSwiftExtensions/Lobby)\n- [Full Documentation via CocoaDocs](http://cocoadocs.org/docsets/EZSwiftExtensions/)\n\n## Example Usage\n\nEasily get an object at a specified index:\n``` swift\nvar myArray = [\"charmander\",\"bulbasaur\",\"squirtle\"]\nprint(myArray.get(1)) // \"bulbasaur\"\n```\nEasily access a random element:\n\n``` swift\nvar myArray = [\"charmander\",\"bulbasaur\",\"squirtle\"]\nprint(myArray.random()) // bulbasaur or something else\n```\n\nEasily find the indexes of an object:\n``` swift\nvar myArray = [\"charmander\",\"bulbasaur\",\"squirtle\",\"charmander\"]\nprint(myArray.indexesOf(\"charmander\")) // [0,3]\n```\nEasily check if an array contains another array:\n``` swift\nvar myArray = [\"charmander\",\"bulbasaur\",\"squirtle\"]\nprint(myArray.containsArray([\"charmander\",\"bulbasaur\"])) // true\nprint(myArray.containsArray([\"string\"])) // false\n```\nBlock Objects\nThese objects use completion blocks instead of selectors, taken from: CEMKit-Swift\nEasily initialize a BlockButton:\n``` swift\n\nlet button = BlockButton(x: 0, y: 0, w: 100, h: 100) { (sender) -\u003e Void in\n    print(\"Block button clicked!\")\n}\nlet button1 = BlockButton(x: 0, y: 0, w: 100, h: 100)\nbutton1.addAction { (sender) -\u003e Void in\n    print(\"Block button clicked!\")\n}\n\n// There are also BlockWebView, BlockTap, BlockPan, BlockSwipe, BlockPinch, BlockLongPress\n```\n\nEasily convert between different types:\n``` swift\nvar myCGFloat = myInt.toCGFloat\nvar myString = myInt.toString\nvar myDouble = myString.toDouble\nvar myInt = myDouble.toInt\n```\nEasily toggle it:\n``` swift\nvar myBool: Bool = true\nprint(myBool.toggle()) // false\n```\nEasily initialize your objects:\n``` swift\nlet myView = UIView(x: 0, y: 0, w: 100, h: 100)\nprint(myView.frame) // (0.0, 0.0, 100.0, 100.0)\n```\nEasily access your ViewController on top of your view stack:\n``` swift\nez.topMostViewController?.presentViewController(myAlertController, animated: true, completion: nil)\n// topMostViewController is your rootViewController\n// Intended for showing small VCs like UIAlertControllerstring.length, string.capitalizefirst, string.trim, string.isemail, \n```\nEasily initialize your colors:\n``` swift\nlet myColor = UIColor(r: 100, g: 100, b: 100) // Default alpha is 1\n```\nEasily run block of codes after a certain delay:\n``` swift\nTimer.runThisAfterDelay(seconds: 2) { () -\u003e () in\n    print(\"Prints this 2 seconds later in main queue\")\n}\n```\nEasily run code every seconds:\n``` swift\nvar count = 0\nTimer.runThisEvery(seconds: 1) { (timer) -\u003e Void in\n    print(\"Will print every second\")\n    if count == 3 {\n        timer?.invalidate()\n    }\n    count += 1\n}\n```\nEasily access your projects version and build numbers:\n``` swift\nprint(ez.appVersion) // 0.3\nprint(ez.appBuild) // 7\nprint(ez.appVersionAndBuild) // v0.3(7)\n\nEasily track screen shots:\nez.detectScreenShot { () -\u003e () in\n    print(\"User took a screen shot\")\n}\n```\n\n## Installation\n\n### Manually (~10 seconds)\n\n1. Download and drop '/Sources' in your project.  \n2. Congratulations!  \n\n### Install via CocoaPods (~10 seconds)\n\nYou can use [CocoaPods](http://cocoapods.org/) to install `EZSwiftExtensions` by adding it to your `Podfile`:\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\npod 'EZSwiftExtensions' #Stable release for Swift 3.0\n\npod 'EZSwiftExtensions', :git =\u003e 'https://github.com/goktugyil/EZSwiftExtensions.git' #Latest release for Swift 3.0\npod 'EZSwiftExtensions', :git =\u003e 'https://github.com/goktugyil/EZSwiftExtensions.git', :branch =\u003e 'Swift2.3' #For Swift 2.3\npod 'EZSwiftExtensions', '~\u003e 1.6' #For Swift 2.2\n```\n\nTo get the full benefits import `EZSwiftExtensions` wherever you import UIKit\n\n``` swift\nimport UIKit\nimport EZSwiftExtensions\n```\n\n### Install via [Carthage](https://github.com/Carthage/Carthage)\n\nCreate a `Cartfile` that lists the framework and run `carthage bootstrap`. Follow the [instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios) to add `$(SRCROOT)/Carthage/Build/iOS/EZSwiftExtensions.framework` to an iOS project.\n\n```\ngithub \"goktugyil/EZSwiftExtensions\"\n```\n\n## Requirements\n\n- Swift 2 or later\n\n## Possible features\n\n- More extensions! Please if there is an extension you are constantly using, send a pull request now!\n- Fancy pictures and jpgs in documentation.\n- Documentations inside code \n- List of contents inside readme\n- Completing `TODO`s in source code.\n- OSX compatibility and add here https://github.com/AndrewSB/awesome-osx\n\n## Sources Used\n\n- [ExSwift by pNre](https://github.com/pNre/ExSwift)\n- [SKTUtils by raywenderlich](https://github.com/raywenderlich/SKTUtils)\n- [CEMKit-Swift by cemolcay](https://github.com/cemolcay/CEMKit-Swift)\n- [SwiftySwift by adeca](https://github.com/adeca/SwiftySwift)\n- [Geometry by artman](https://github.com/artman/Geometry)\n- [Swift-Extensions by vitkuzmenko](https://github.com/vitkuzmenko/Swift-Extensions)\n- [SwiftTweetGettr by jmenter](https://github.com/jmenter/SwiftTweetGettr)\n- [Basics by dennisweissmann](https://github.com/dennisweissmann/DeviceKit)\n- [toNumber by Mamesoft](https://github.com/Mamesoft/toNumber)\n- [RBResizer by hcatlin](https://gist.github.com/hcatlin/180e81cd961573e3c54d)\n\nAnd countless gists and stackoverflow answers.\n\n## License\nEZSwiftExtensions is available under the MIT license. See the [LICENSE file](https://github.com/goktugyil/EZSwiftExtensions/blob/master/LICENSE).\n\n## Keywords\nswift, extension, uikit, exswift, foundation, library, framework, tool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEsqarrouth%2FEZSwiftExtensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEsqarrouth%2FEZSwiftExtensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEsqarrouth%2FEZSwiftExtensions/lists"}