Skip to content

Instantly share code, notes, and snippets.

View stevemoser's full-sized avatar
🐫
🥶

Steve Moser stevemoser

🐫
🥶
View GitHub Profile
- (void)loadA
{
}
- (void)loadA
{
[[self aDataSource] loadAWithOnLoad:^(NSArray *newObjects) {
NSLog(@"WAIT 1");
} onError:^(NSError *error) {
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
@stevemoser
stevemoser / gist:3444636
Created August 24, 2012 01:51
RestKit Post
NSURL* baseURL = [NSURL URLWithString:@"https://api.example.com/"];
RKObjectManager* objectManager = [RKObjectManager objectManagerWithBaseURL:baseURL];
objectManager.acceptMIMEType = RKMIMETypeJSON;
objectManager.serializationMIMEType = RKMIMETypeJSON;
[objectManager.mappingProvider setMapping:[SMArticle mapping] forKeyPath:@"article"];
[objectManager.mappingProvider
@stevemoser
stevemoser / gist:3444638
Created August 24, 2012 01:52
RestKit Post 2
#import "SMArticle.h"
#import <RestKit/RestKit.h>
@implementation SMArticle
@synthesize articleID,name;
+ (RKObjectMapping *)mapping {
@stevemoser
stevemoser / gist:3444690
Created August 24, 2012 02:01
RestKit post 3
#import <RestKit/RestKit.h>
@class SMArticle
@interface SMArticleDataController : NSObject
- (void)loadArticlesWithOnLoad:(RKObjectLoaderDidLoadObjectsBlock)loadBlock onError:(RKRequestDidFailLoadWithErrorBlock)failBlock;
- (int)articleCount;
- (SMArticle*)articleAtIndex:(int)index;
@stevemoser
stevemoser / gist:3444720
Created August 24, 2012 02:06
RestKit post 4
- (void)refreshArticles
{
[SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeGradient];
__weak SMArticlesViewController *me = self;
[[self articlesDataSource] loadArticlesWithOnLoad:^(NSArray *newObjects) {
if (me != nil) {
[me.tableView reloadData];
[SVProgressHUD dismissWithSuccess:nil afterDelay:1];
Pod::Spec.new do |s|
s.name = 'MHNatGeoViewControllerTransition'
s.version = '0.0.1'
s.summary = 'A new ViewController transition inspired by NatGeo City Guides by National Geographic.'
s.homepage = 'https://github.com/michaelhenry/MHNatGeoViewControllerTransition'
s.author = 'Michael Henry'
s.source = { :git => 'https://github.com/michaelhenry/MHNatGeoViewControllerTransition.git' }
s.source_files = 'MHNatGeoViewControllerTransition/*'
end
@stevemoser
stevemoser / Trees.swift
Last active August 29, 2015 14:25 — forked from CodaFi/Trees.swift
A small propositional logic proof tree generator and prover.
//: Playground - noun: a place where people can play
//: Prop 'til you Drop
indirect enum Formula : CustomStringConvertible {
case Var(String)
case Or(Formula, Formula)
case And(Formula, Formula)
case Imply(Formula, Formula)
case BiImply(Formula, Formula)
case Negate(Formula)
@stevemoser
stevemoser / iOS 7 dynamic font mappings
Last active August 29, 2015 14:27 — forked from nuthatch/iOS 7 dynamic font mappings
What is UIFontTextStyleHeadline *really*? Dump out preferredFontForTextStyle for UIFontTextStyleHeadline, UIFontTextStyleSubheadline, UIFontTextStyleBody, UIFontTextStyleFootnote, UIFontTextStyleCaption1, UIFontTextStyleCaption2 to examine the font name, weight, and point size.
+ (void)describePreferredFonts
{
static NSArray *textStyles;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
textStyles = @[UIFontTextStyleHeadline,
UIFontTextStyleSubheadline,
UIFontTextStyleBody,
UIFontTextStyleFootnote,
UIFontTextStyleCaption1,
{
"products": [
{
"name": "macbook-12-inch",
"brand": "MacBook",
"model": "MacBook 12-inch",
"video-screensaver": {
"src": "\/videos\/mac-fall2016\/16x10\/screensaver.mov",
"width": "1152",
"height": "720"
@stevemoser
stevemoser / IncompatibleAppsList.plist
Created June 20, 2019 19:38
List of 235 apps incompatible with macOS Catalina 10.15
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IncompatiblePaths</key>
<array>
<dict>
<key>Application Name</key>
<string>Sxs Memory Card Driver</string>
<key>Blurb</key>