Skip to content

Instantly share code, notes, and snippets.

View yukitoto's full-sized avatar

Shibuya Yukito yukitoto

  • picon inc.
  • Tokyo
View GitHub Profile
@yukitoto
yukitoto / UIImage+imageWithAlphaComponent.swift
Last active August 22, 2017 10:36
Extension For change UIImage. This is useful for set highlighted image for UIButton.
//
// UIImage+Extension.swift
//
// Created by Yukito Shibuya on 2016/10/08.
// Copyright © 2016年 yukitoto. All rights reserved.
//
import UIKit
extension UIImage {
@yukitoto
yukitoto / Regexp.swift
Created June 16, 2016 02:43 — forked from takafumir/Regexp.swift
Swift utility class for regular expression
import Foundation
class Regexp {
let internalRegexp: NSRegularExpression
let pattern: String
init(_ pattern: String) {
self.pattern = pattern
var error: NSError?
self.internalRegexp = NSRegularExpression( pattern: pattern, options: NSRegularExpressionOptions.CaseInsensitive, error: &error)!