Latest 0.2.0
Homepage https://github.com/aborren/dnaXtensions
License MIT
Platforms ios 8.0
Authors

Version
License
Platform

Introduction

Useful extensions for iOS development.

Requirements

  • iOS8
  • Swift 4

Installation

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

pod 'dnaXtensions'

Extensions

UIColor:

lighter

Returns a lighter version of the color. Also possible to specify an amount between 0.0 and 1.0.

darker

Returns a darker version of the color. Also possible to specify an amount between 0.0 and 1.0.

String:

localized

Shorthand way to get localized string with added functionality to fetch another preferred language.

UIViewController:

removeNavigationBarHairLine

Removes the view controller’s navigation controller’s navigationbar hairline (if it exists).

restoreNavigationBarHairLine

Restores the navigation hairline to the default setting.

addTapToDismissKeyboardGesture

Adds a tap gesture to the view controller’s view that dismisses any input views on tap.

dismissKeyboard

Removes any input views.

Date:

isEqualToDateIgnoringTime

Checks two dates based on their year month and day, excluding the time aspect.

isToday

Boolean to indicate whether the date is the same day as current date.

isTomorrow

Boolean to indicate whether the date is the same day as tomorrow.

isYesterday

Boolean to indicate whether the date is the same day as yesterday.

UIView:

getImageFromView

Returns an UIImage of the view.

UIImage:

transparentized

Set an alpha value for the image.

scaled

Returns self as a scaled image of given size.

UIAlertController

addAction

Add action with less boilerplate code using default implementation.

Author

Dan Isacson

License

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

Latest podspec

{
    "name": "dnaXtensions",
    "version": "0.2.0",
    "summary": "Useful Swift iOS extensions.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/aborren/dnaXtensions",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dan Isacson": "[email protected]"
    },
    "source": {
        "git": "https://github.com/aborren/dnaXtensions.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "dnaXtensions/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This