Skip to content

Applitom/ApplitomHelpers

Repository files navigation

ApplitomHelpers

Build Status CocoaPods Version Swift Version Platform

About

ApplitomHelpers is a Swift library that provides helpful extensions and extra helpers to your project.
I started it for my personal use and decided to publish it as an open-source. I will add more functionality as time passes.

Content

  1. Requirements
  2. Integration
  3. Extentions

Requirements

  • iOS 9.1+
  • Xcode 8

Integration

You can use CocoaPods to install ApplitomHelpers by adding it to your Podfile:

platform :ios, '9.0'
use_frameworks!

target 'MyApp' do
    pod 'ApplitomHelpers'
end

Extentions

UIImage+Utils

Create UIImage from the given UIView.
convenience init(view: UIView)

with this convenience init you can init new UIImagw with an UIView instance

Resize an image
func resize(newSize:CGSize) -> UIImage
Add insets to an image
func addInsets(insets: UIEdgeInsets) -> UIImage
Add alpha to an image
func imageWithAlpha(_ alphaFactor: CGFloat) -> UIImage

Int Extentions

Add commas to Integer
func withCommas() -> String

returns string number with commas, for example 1000000 will return string of "1,000,000"