Latest 0.1.1
Homepage https://github.com/ajijoyo/AJCommonUtils
License MIT
Platforms ios 9.0
Authors

[Language]()
CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

XCode 9.4
Swift 4

Installation

AJCommonUtils is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'AJCommonUtils'

Used

Language

Set setDefaultLocale at didFinishLaunchingWithOptions to initial Bundle spesific Language on first install
by default value is en you should change prefered default language,

Make sure you have settings Localized.strings
Everytime locale change you can observer using NotificationCenter with key languageDidChanged

Language.setDefaultLocale(language: "id")

function setLocale to set Bundle to spesific Language on runtime, non need to restart Apps

Dont Forget to refresh entire UI after change language

Language.setLocale(language: "en")

function localized to change Language based on Localized.Strings with selected setLocale

let title = "welcome.example.title".localized

titleLabel.text = title

Color

init color by hexString,by default alpha is 1.0 it value start from 0 to 1.0

UIColor(hexString: #ffffff, alpha: 0.5)

init color by RGB, by default alpha is 1.0 it value start from 0 to 1.0

UIColor(R: 255, G: 255, B: 255, alpha: 0.4)

extension of UIColor lighter change color more lighter not change alpha, default is 0.3 it value start from 0 to 1.0

UIColor.black.lighter(by: 0.3)

extension of UIColor darker change color more darker not change alpha, default is 0.3 it value start from 0 to 1.0

UIColor.black.darker(by: 0.3)

Author

ajijoyo, [email protected]

License

AJCommonUtils is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AJCommonUtils",
    "version": "0.1.1",
    "summary": "Common Utility on iOS Development",
    "swift_version": "4.0",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/ajijoyo/AJCommonUtils",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ajijoyo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ajijoyo/AJCommonUtils.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "AJCommonUtils/Classes/*.{swift,h,m}"
}

Pin It on Pinterest

Share This