Latest 1.0.0
Homepage https://github.com/IvanVorobei/SparrowKit
License MIT
Platforms ios 10.0
Authors

It is library of projects SPPermission & SPStorkController. Also library have many useful extenshions and classes. Some fitures I am describe here

Integration

Drop in Source/sparrow folder to your Xcode project. Make sure to enable Copy items if needed and Create groups

Or via CocoaPods:

pod 'SparrowKit'

and import library in class:

import SparrowKit

Extenshions

I am describe some fitures, not all. See classes in Source/sparrow for find more information

UIView

Set paralax for view:

let view = UIView()
view.setParalax(amount: 10)

Set paralax for view:

let image: UIImage = view.convertToImage()

Set deep shadow:

view.setDeepShadow()
view.removeShadow()

Animate corner radius:

view.addCornerRadiusAnimation(to: 10, duration: 0.3)

Max rounding view:

view.round()

UIViewController

Wrap controller to navigation controller:

let controller = UIViewController()
let nav = controller.wrapToNavigationController()

Dismiss keyborad now:

controller.dismissKeyboard()

Save image or video to gallery:

controller.save(image: UIImage())
controller.saveVideo(url: "https://youtu.be/1mDdX7fQRv4")

Set navigation title for small or large style:

controller.setNavigationTitle("Title", style: .large)

Safe area for controller:

let _ = controller.topSafeArea
let _ = controller.bottomSafeArea

Set navigation title color:

controller.navigationTitleColor = UIColor.black

UIButton

var button = UIButton()
button.target {
    print("Touch up inside")
}

Func showText show title animatable in button frame:

var button = UIButton()
button.showText("Alert")

Func setAnimatableText set new title for button animatable:

var button = UIButton()
button.setAnimatableText("New Title")

UIImageView

Func setNativeStyle set background and border from apple way style:

let imageView = UIImageView()
imageView.setNativeStyle()

UILabel

Func setShadowOffsetForLetters set shadow for letters:

let label = UILabel()
label.text = "Text"
label.setShadowOffsetForLetters()

UITableView

let tableView = UITableView()
let _ = tableView.isEmpty
let _ = tableView.isEmpty(section: 0)
let _ = tableView.lastSection
let _ = tableView.lastSectionWithRows // last not empty section
let _ = tableView.firstSectionWithRows // first not empty section

UIColor

Support HEX for create UIColor:

UIColor.init(hex: "#000000")

String

let _ = "[email protected]".isEmail
let _ = "[email protected]".isLink

Latest podspec

{
    "name": "SparrowKit",
    "version": "1.0.0",
    "summary": "Simple swift classes for iOS development",
    "homepage": "https://github.com/IvanVorobei/SparrowKit",
    "source": {
        "git": "https://github.com/IvanVorobei/SparrowKit.git",
        "tag": "1.0.0"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ivan Vorobei": "[email protected]"
    },
    "social_media_url": "http://t.me/ivanvorobei",
    "swift_version": "4.2",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "Source/sparrow/**/*.swift"
}

Pin It on Pinterest

Share This