This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ColorPalette.swift | |
// justInCase | |
// | |
// Created by Takuya Otani on 11/11/19. | |
// Copyright © 2019 justInCase. All rights reserved. | |
// | |
struct ColorPalette { | |
static private let minIndex = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public extension Array { | |
static func fromTuple<T>(_ tuple:T) -> [Element] { | |
let reflection = Mirror(reflecting: tuple).children | |
var arr : [Element] = [] | |
for i in 0..<reflection.count { | |
let index = reflection.index(reflection.startIndex, offsetBy: i) | |
if let value = reflection[index].value as? Element { | |
arr.append(value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(?:(?:(?:(?:(?:(?:[\x20\x09]*(?:\x0D\x0A))?[\x20\x09]+|(?:[\x20\x0 | |
9]+(?:(?:\x0D\x0A)[\x20\x09]+)*))?(\((?:(?:(?:[\x20\x09]*(?:\x0D\x | |
0A))?[\x20\x09]+|(?:[\x20\x09]+(?:(?:\x0D\x0A)[\x20\x09]+)*))?(?:( | |
?:[\x21-\x27\x2A-\x5B\x5D-\x7E]|[\x01-\x08\x0B\x0C\x0E-\x1F\x7F])| | |
(?:\\(?:[\x21-\x7E]|[\x20\x09])|(?:\\(?:\x00|[\x01-\x08\x0B\x0C\x0 | |
E-\x1F\x7F]|\x0A|\x0D)))|(?-1)))*(?:(?:[\x20\x09]*(?:\x0D\x0A))?[\ | |
x20\x09]+|(?:[\x20\x09]+(?:(?:\x0D\x0A)[\x20\x09]+)*))?\)))+(?:(?: | |
[\x20\x09]*(?:\x0D\x0A))?[\x20\x09]+|(?:[\x20\x09]+(?:(?:\x0D\x0A) | |
[\x20\x09]+)*))?|(?:(?:[\x20\x09]*(?:\x0D\x0A))?[\x20\x09]+|(?:[\x | |
20\x09]+(?:(?:\x0D\x0A)[\x20\x09]+)*)))?(?:[A-Za-z0-9!#$%&'*+\-/=? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface SBLImageHelper | |
/** | |
* Generates an image which is tinted with a given color. | |
* @param image - an image to be tinted | |
* @param color - tint color | |
* @return an instance of UIImage | |
*/ | |
+ (UIImage *)tintedImageFromImage:(UIImage *)image | |
withColor:(UIColor *)color; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MyClass (CategoryName) | |
// 追加したいメソッド | |
@end |