Skip to content

Instantly share code, notes, and snippets.

View vadimsmirnovnsk's full-sized avatar

Smirnov Vadim vadimsmirnovnsk

View GitHub Profile
import VNCommon
import VNServices
internal protocol IHaveReport {
associatedtype TReportType
}
internal class FlowTableVM<TReport>: FlowSimpleTableVM, IHaveReport {
typealias TReportType = TReport
@vadimsmirnovnsk
vadimsmirnovnsk / UIImage+Colorizable.swift
Created April 7, 2017 04:17
UIImage+Colorizable – paint image with color
internal extension UIImage {
private static let kSubstrateCircleDiameter: CGFloat = 24.0
/// Возвращает картинку, покрашенную в цвет color
internal func colorized(with color: UIColor?) -> UIImage {
guard let color = color else { return self }
UIGraphicsBeginImageContextWithOptions(self.size, false, self.scale)
@vadimsmirnovnsk
vadimsmirnovnsk / BARAnimation.h
Created March 13, 2016 13:22
Objective-C animation chaining utility
@interface BARAnimation : NSObject
/*! Just start to construct your animation from this method. */
+ (instancetype)construct;
/*! Before all animations will execute this block. */
- (instancetype)initially:(void (^)(void))initiallyBlock;
/*! Add animations and link it with each other. */
- (instancetype)animationWithDuration:(NSTimeInterval)duration
@vadimsmirnovnsk
vadimsmirnovnsk / Swift Category for your custom UIColors
Last active September 27, 2015 08:09
Swift Category for your custom UIColors
import UIKit
extension UIColor
{
struct dgs
{
static let edwardColor: UIColor =
{
return UIColor.colorWithHexString("#B1B3B3")!
}()