Swarkn is a lightweight library which provides you with small funcionalities that you use to miss in your Swift projects.
🔗 Extensions:
- UIColor - initialization from a rgb value.
- UIImage - image resizing, image with a color and a size...
- UIImageView - Mask with circle, set elevation...
- UINavigationBar - Hide Navigation Bar Bottom Line.
- UIActivityType - Get raw name description from different activities
- Array - Remove duplicates from an array easily.
- Dictionary - Sort keys by value and vice versa.
- NSBundle - Build and Version name as variables.
- NSLocale - languagesLocaleISO639_1 and languagesLocaleISO639_3 as Dictionaries,
get country name form ISO code...
- String - Ignore accents, trimming, substring with a given range...
✅ Validation:
- Email
- Phone Number (Spain numbers so far)
- URL
- ID Card (Spain so far)
- Social Security Number (Spain so far)
🛠 Utils:
- Take a screenshot of the current window (takeScreenshot())
- Delay a code block execution in an easy way (delay(seconds, closure))
- IS_IPHONE, IS_IPAD, ScreenType (iPhone4, iPhone 5, etc...) constants, in order to give
a quick access of them.
- DimmingPresentationController. UIPresentationController which gives a dimmed
background to your presented controller.
Swarkn is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Swarkn"
- Swift 3
Swarkn is available under the MIT license. See the LICENSE file for more info.