Skip to content

Instantly share code, notes, and snippets.

View bananita's full-sized avatar

Michał Banasiak bananita

  • so many apps
  • Poland
View GitHub Profile
@bananita
bananita / AvailableFonts
Last active December 26, 2015 12:49
Snippet that shows all available fonts.
NSArray *fontFamilyNames = [UIFont familyNames];
for (NSString *familyName in fontFamilyNames)
{
NSLog(@"Font Family Name: %@", familyName);
NSArray *names = [UIFont fontNamesForFamilyName:familyName];
NSLog(@"Font Names:\n %@", names);
}
@bananita
bananita / ApplicationContext.h
Last active December 19, 2015 19:09
Cocoa singletons wrapped in one class to allow mocking them.
//
// ApplicationContext.h
//
// Created by Michał Banasiak on 22.07.2013.
// Copyright (c) 2013 Michał Banasiak. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ApplicationContext : NSObject
platform :ios, '6.0'
inhibit_all_warnings!
pod 'ObjectiveSugar'
pod 'MBLogging', :git => 'https://github.com/bananita/MBLogging.git', :tag => '0.1.0'
target :tests, :exclusive => true do
pod 'OCMock'
end
gem "cocoapods", "~> 0.19.1"
# OS X temporary files
.DS_Store
*.swp
*.lock
profile
# Compiled classes
*class
*dex
# OS X temporary files
.DS_Store
*.swp
*.lock
profile
# XCode user data
xcuserdata
# Cocoapods