Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sochalewski/tinyswift
TinySwift is an extension pack for Swift classes and structs
https://github.com/sochalewski/tinyswift
extension ios swift swift4 swift5 tvos watchos
Last synced: 24 days ago
JSON representation
TinySwift is an extension pack for Swift classes and structs
- Host: GitHub
- URL: https://github.com/sochalewski/tinyswift
- Owner: sochalewski
- License: mit
- Created: 2016-09-24T21:56:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-10-24T09:51:04.000Z (about 1 year ago)
- Last Synced: 2024-04-25T10:00:27.760Z (7 months ago)
- Topics: extension, ios, swift, swift4, swift5, tvos, watchos
- Language: Swift
- Homepage:
- Size: 436 KB
- Stars: 13
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TinySwift
[![CI Status](https://github.com/sochalewski/TinySwift/actions/workflows/actions.yml/badge.svg)](https://github.com/sochalewski/TinySwift/actions)
[![codecov](https://codecov.io/gh/sochalewski/TinySwift/branch/master/graph/badge.svg)](https://codecov.io/gh/sochalewski/TinySwift)
[![Version](https://img.shields.io/cocoapods/v/TinySwift.svg?style=flat)](http://cocoapods.org/pods/TinySwift)
[![License](https://img.shields.io/cocoapods/l/TinySwift.svg?style=flat)](http://cocoapods.org/pods/TinySwift)
[![Platform](https://img.shields.io/cocoapods/p/TinySwift.svg?style=flat)](http://cocoapods.org/pods/TinySwift)## Requirements
iOS 12+, tvOS 12+, watchOS 4+
## Installation
TinySwift is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "TinySwift"
```## Usage
TinySwift is an extension pack for Swift classes and structs.
It contains the following functions and properties:
### AVAsset
* `var thumbnail` iOS, tvOS
### Bool
* `init(_: Integer)` iOS, tvOS, watchOS
* `static var random` iOS, tvOS, watchOS
* `func toggle()` iOS, tvOS, watchOS### CGAffineTransform
* `var rotationAngle` iOS, tvOS, watchOS
* `var scaleX` iOS, tvOS, watchOS
* `var scaleY` iOS, tvOS, watchOS### Collection
* `var random` iOS, tvOS, watchOS
#### Array
* `subscript(safe:)` iOS, tvOS, watchOS
* `var shuffled` iOS, tvOS
* `func remove(element:)` iOS, tvOS, watchOS
* `func shuffle()` iOS, tvOS#### RandomAccessCollection
* `var appearances` iOS, tvOS, watchOS
* `var arithmeticMean` iOS, tvOS, watchOS
* `var areAllElementsEqual` iOS, tvOS, watchOS
* `var geometricMean` iOS, tvOS, watchOS
* `var median` iOS, tvOS, watchOS
* `var mode` iOS, tvOS, watchOS
* `var set` iOS, tvOS, watchOS
* `var standardDeviation` iOS, tvOS, watchOS
* `var sum` iOS, tvOS, watchOS
* `var variance` iOS, tvOS, watchOS### Data
* `init(hexadecimalString:)` iOS, tvOS, watchOS
* `var hexadecimalString` iOS, tvOS, watchOS
* `func qrCode(correctionLevel:)` iOS, tvOS### Date
* `var day` iOS, tvOS, watchOS
* `var firstOfMonth` iOS, tvOS, watchOS
* `var firstOfYear` iOS, tvOS, watchOS
* `var lastOfMonth` iOS, tvOS, watchOS
* `var lastOfYear` iOS, tvOS, watchOS
* `var month` iOS, tvOS, watchOS
* `var nextDay` iOS, tvOS, watchOS
* `var previousDay` iOS, tvOS, watchOS
* `var weekday` iOS, tvOS, watchOS
* `var year` iOS, tvOS, watchOS### FloatingPoint
* `var additiveInverse` iOS, tvOS, watchOS
* `var degreesToRadians` iOS, tvOS, watchOS
* `var multiplicativeInverse` iOS, tvOS, watchOS
* `var radiansToDegrees` iOS, tvOS, watchOS### Integer
* `var additiveInverse` iOS, tvOS, watchOS
* `var days` iOS, tvOS, watchOS
* `var degreesToRadians` iOS, tvOS, watchOS
* `var factorial` iOS, tvOS, watchOS
* `var hours` iOS, tvOS, watchOS
* `var isEven` iOS, tvOS, watchOS
* `var isOdd` iOS, tvOS, watchOS
* `var isPrime` iOS, tvOS, watchOS
* `var minutes` iOS, tvOS, watchOS
* `var multiplicativeInverse` iOS, tvOS, watchOS
* `var radiansToDegrees` iOS, tvOS, watchOS
* `var seconds` iOS, tvOS, watchOS#### Int
* `init(random:)` iOS, tvOS, watchOS
* `var random` iOS, tvOS, watchOS
* `func times(execute:)` iOS, tvOS, watchOS### NSAttributedString
* `func formatted(substring:font:)` iOS, tvOS, watchOS
### String
* `init(path:)` iOS, tvOS, watchOS
* `init(random:length:nonRepeating:)` iOS, tvOS, watchOS
* `var camelCased` iOS, tvOS, watchOS
* `var dataFromHexadecimalString` iOS, tvOS, watchOS
* `var emptyIfNil` iOS, tvOS, watchOS
* `var initials` iOS, tvOS, watchOS
* `var isEmailAddress` iOS, tvOS, watchOS
* `var lines` iOS, tvOS, watchOS
* `var localized` iOS, tvOS, watchOS
* `var nilIfEmpty` iOS, tvOS, watchOS
* `var nonEmptyLines` iOS, tvOS, watchOS
* `var trimmed` iOS, tvOS, watchOS
* `var upperCamelCased` iOS, tvOS, watchOS
* `func formatted(substring:font:)` iOS, tvOS, watchOS
* `func occurrences(of:)` iOS, tvOS, watchOS
* `func qrCode(correctionLevel:encoding:)` iOS, tvOS### TimeInterval
* `func time(with:)` iOS, tvOS, watchOS
### UIColor
* `init(hex:alpha:)` iOS, tvOS, watchOS
* `var hex` iOS, tvOS, watchOS### UIDevice
* `var device` iOS, tvOS
* `var deviceCode` iOS, tvOS
* `var diskSize` iOS, tvOS
* `var freeDiskSpace` iOS, tvOS### UIImage
* `init(color:size:)` iOS, tvOS, watchOS
* `var grayscale` iOS, tvOS
* `var normalizedImage` iOS, tvOS, watchOS
* `var png` iOS, tvOS, watchOS
* `var square` iOS, tvOS, watchOS
* `var thumbnail` iOS, tvOS, watchOS
* `static func get(from:completion:)` iOS, tvOS, watchOS
* `func border(width:color:)` iOS, tvOS, watchOS
* `func color(at:)` iOS, tvOS, watchOS
* `func crop(to:)` iOS, tvOS, watchOS
* `func heic(quality:)` iOS, tvOS
* `func jpeg(quality:)` iOS, tvOS, watchOS
* `func resize(to:)` iOS, tvOS, watchOS### UIImageView
* `func setImage(from:placeholder:completion:)` iOS, tvOS
* `func sharpenForQRCode()` iOS, tvOS### UIScreen
* `var isLowResolution` tvOS
* `var isSmallScreen` iOS
* `var size` iOS### UITableViewCell
* `func hideSeparator()` iOS
### UIView
* `var viewFromNib` iOS, tvOS
### UIViewController
* `func presentAlertController(withTitle:message:completion:handler:)` iOS, tvOS
### URL
* `func qrCode(correctionLevel:encoding:)` iOS, tvOS
### WKInterfaceDevice
* `var device` watchOS
* `var isSmaller` watchOS
* `var isLarger` watchOS## Author
Piotr Sochalewski, sochalewski.github.io
## License
TinySwift is available under the MIT license. See the LICENSE file for more info.