Skip to content

Instantly share code, notes, and snippets.

View Kirow's full-sized avatar

Kirill Serebriakov Kirow

View GitHub Profile
@Kirow
Kirow / Available Fonts.m
Last active August 29, 2015 14:01
Enumerate Fonts available in the application
//======================================
for (NSString* family in [UIFont familyNames]) {
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family]) {
NSLog(@" %@", name);
}
}
//======================================
@Kirow
Kirow / UIImage+Blur.m
Created May 7, 2014 10:58
Blur category. This method is taken from Apple's UIImageEffects category provided in WWDC 2013 sample code
@implementation UIImage (ImageBlur)
// This method is taken from Apple's UIImageEffects category provided in WWDC 2013 sample code
- (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage {
// Check pre-conditions.
if (self.size.width < 1 || self.size.height < 1) {
NSLog(@"*** error: invalid size: (%.2f x %.2f). Both dimensions must be >= 1: %@", self.size.width, self.size.height, self);
return nil;
}
if (!self.CGImage) {
NSLog(@"*** error: image must be backed by a CGImage: %@", self);
//
// LOOProfiling.h
//
// Created by Marcin Swiderski on 4/12/12.
// Copyright (c) 2012 Marcin Swiderski. All rights reserved.
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//