GitHub - SwifterSwift/SwifterSwift: A handy collection of more than 500 native S...
source link: https://github.com/SwifterSwift/SwifterSwift
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
SwifterSwift is a collection of over 500 native Swift extensions, with handy methods, syntactic sugar, and performance improvements for wide range of primitive data types, UIKit and Cocoa classes –over 500 in 1– for iOS, macOS, tvOS and watchOS.
Whats New in v4.1.1?
Requirements:
- iOS 8.0+ / tvOS 9.0+ / watchOS 2.0+ / macOS 10.10+
- Xcode 9.0+
- Swift 4.0+
Looking for Swift 3
- To use with Swift 3 / Xcode 8.x please ensure you are using
v3.1.1
. - To use with Swift 3.2 / Xcode 9.x please ensure you are using
v3.2.0
.
Installation
CocoaPodsTo integrate SwifterSwift into your Xcode project using CocoaPods, specify it in your Podfile
:
- Integrate All extensions (recommended):
pod 'SwifterSwift'
- Integrate SwiftStdlib extensions only:
pod 'SwifterSwift/SwiftStdlib'
- Integrate Foundation extensions only:
pod 'SwifterSwift/Foundation'
- Integrate AppKit extensions only:
pod 'SwifterSwift/AppKit'
- Integrate CoreGraphics extensions only:
pod 'SwifterSwift/CoreGraphics'
- Integrate CoreLocation extensions only:
pod 'SwifterSwift/CoreLocation'
CarthageTo integrate SwifterSwift into your Xcode project using Carthage, specify it in your Cartfile
:
github "SwifterSwift/SwifterSwift" ~> 4.0
Swift Package ManagerYou can use The Swift Package Manager to install SwifterSwift
by adding the proper description to your Package.swift
file:
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
targets: [],
dependencies: [
.Package(url: "https://github.com/SwifterSwift/SwifterSwift.git", majorVersion: 4),
]
)
Note that the Swift Package Manager is still in early design and development, for more information checkout its GitHub Page
ManuallyAdd the extensions folder to your Xcode project to use all extensions, or a specific extension.
List of All Extensions
SwiftStdlib ExtensionsArray extensions
Bool extensions
Character extensions
Collection extensions
Dictionary extensions
Double extensions
Float extensions
FloatingPoint extensions
Int extensions
Optional extensions
SignedInteger extensions
SignedNumeric extensions
String extensions
Calendar extensions
Data extensions
Date extensions
Locale extensions
NSAttributedString extensions
NSPredicate extensions
URL extensions
URLRequest extensions
UserDefaults extensions
UIAlertController extensions
UIBarButtonItem extensions
UIButton extensions
UICollectionView extensions
UIDatePicker extensions
UIFont extensions
UIColor extensions
UIImage extensions
UIImageView extensions
UILabel extensions
UINavigationBar extensions
UINavigationController extensions
UINavigationItem extensions
UISearchBar extensions
UISegmentedControl extensions
UISlider extensions
UIStoryboard extensions
UISwitch extensions
UITabBar extensions
UITableView extensions
UITextField extensions
UITextView extensions
UIViewController extensions
UIView extensions
CoreGraphics Extensions
CoreLocation Extensions
Misc. Extensions
How cool is this?
SwifterSwift is a library of over 500 properties and methods, designed to extend Swift's functionality and productivity, staying faithful to the original Swift API design guidelines.
Check Examples.md for some cool examples!
Documentation
Documentation for all extensions, with examples, is available at swifterswift.com/docs
Get involved:
We want your feedback. Please refer to contributing guidelines before participating.
Slack Channel:
It is always nice to talk with other people using SwifterSwift and exchange experiences, so come join our Slack channel.
Thanks:
Special thanks to:
- Steven Deutsch and Luciano Almeida for their latest contributions to extensions, docs and tests.
- Paweł Urbanek for adding tvOS, watchOS, and macOS initial support and helping with extensions.
- Mert Akengin and Bashar Ghadanfar for designing project website and logo.
- Abdul Rahman Dabbour for helping document the project.
- Many thanks to all other contributors of this project.
License
SwifterSwift is released under an MIT license. See LICENSE for more information.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK