Skip to content

creaaa/Crea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

90 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Crea (ver 0.0.18)

Platform Language CocoaPods Carthage compatible Build Status


πŸƒ Own delightful library that supports my iOS dev πŸƒ

Characteristics

Like RxSwift and KingFisher notation, all instance & class method is invoked through a special property 'crea'.

let randomNo = [1,2,3,4,5].crea.random
UIViewController.crea.isNetworkAvailable(host_name: "https://www.google.co.jp/")

As a result, we can distinguish easily between a function come from this library or not.

result

animation: chriseidhof/boom.swift

Usage

Cocoapods

# Uncomment the next line to define a global platform for your project
platform :ios, '10.3'

target '##Target Name##' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Target
  pod 'Crea'

end

Carthage

github "creaaa/Crea"

That's it!
Hope you like it, stay tuned!

Contents

UIKit

UIView

Instance Methods

Name Signature
addConstraints addConstraints (for childView: UIView, insets: UIEdgeInsets = .zero)

UIViewController

Instance Methods

Name Signature
showAlert showAlert (title: String, message: String? = nil, style: UIAlertControllerStyle = .alert)
pushViewController pushViewController (viewController: UIViewController, animated: Bool, completion: (() -> Void)? = nil)
popViewController popViewController (animated: Bool, completion: (() -> Void)? = nil)

Class Methods

Name Signatures
isNetworkAvailable isNetworkAvailable (host_name: String) -> Bool

UINavigationController

Class Methods

Name Signatures
navBarTitle navBarTitle (color: UIColor, fontName: String = "Helvetica", size: CGFloat = 12)
navBarColor navBarColor (color: UIColor)

UITabBar

Class Methods

Name Signatures
tabBarColorSelected tabBarColorSelected (color: UIColor)
tabBarColorUnselected tabBarColorUnselected (color: UIColor)
tabBarItem tabBarItem (color: UIColor, fontName: String = "Helvetica", size: CGFloat = 12)

UIBarButtonItem

Class Methods

Name Signatures
barBtn barBtn (color: UIColor, fontName: String = "Helvetica", size: CGFloat = 12)

UIImage

Instance Methods

Name Signature
resizeUIImage resizeUIImage (width: CGFloat, height: CGFloat) -> UIImage!

UILabel

Instance Methods

Name Signature
kern kern (value: CGFloat)

Foundation

Array

Properties

Name
AssociatedType? random

Date

Class Methods

Name Signatures
date date (from string: String, format: String = "yyyy-MM-dd") -> Date?
string string (date: Date, format: String = "yyyy-MM-dd") -> String

Int

Class Methods

Name Signatures
random random (from: Int, to: Int) -> Int