GithubHelp home page GithubHelp logo

colla2me / sparrowkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karimebrahemabdelaziz/sparrowkit

0.0 0.0 0.0 399 KB

Simplify iOS programming

License: MIT License

Swift 99.94% Ruby 0.06%

sparrowkit's Introduction

SparrowKit

It is library for 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.safeArea.top
let _ = controller.safeArea.bottom

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

sparrowkit's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.