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
public enum SomeError: ErrorType { | |
case Foo | |
case Bar | |
} | |
func willThrowException() throws { | |
throw SomeError.Foo | |
} | |
public class Logger { |
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 "GTTDynamicViewController.h" | |
@interface GTTDynamicViewController () | |
@property (strong, nonatomic) UISegmentedControl *fallingControl; | |
@property (strong, nonatomic) UIDynamicAnimator *animator; | |
@property (strong, nonatomic) UIGravityBehavior *gravity; | |
@property (strong, nonatomic) UICollisionBehavior *collision; | |
@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
#import "GTTSingleton.h" | |
@implementation GTTSingleton | |
+ (GTTSingleton*)sharedInstance { | |
static GTTSingleton *singletonInstance; | |
static dispatch_once_t token; | |
dispatch_once(&token, ^{ | |
singletonInstance = [[GTTSingleton alloc] init]; | |
}); |
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/Foundation.h> | |
@interface GTTSingleton : NSObject | |
+ (GTTSingleton*)sharedInstance; | |
@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
#import "AppDelegate.h" | |
@implementation AppDelegate | |
@synthesize managedObjectContext = _managedObjectContext; | |
@synthesize managedObjectModel = _managedObjectModel; | |
@synthesize persistentStoreCoordinator = _persistentStoreCoordinator; | |
#pragma mark - CoreData |
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 <UIKit/UIKit.h> | |
#import <CoreData/CoreData.h> | |
@interface AppDelegate : UIResponder <UIApplicationDelegate> | |
@property (strong, nonatomic) UIWindow *window; | |
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; | |
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; | |
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; |
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 "ChildViewController.h" | |
@interface ChildViewController () | |
@end | |
@implementation ChildViewController { | |
CGRect viewFrame; | |
} |
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 "ViewController.h" | |
#import "ChildViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController { | |
ChildViewController *child; | |
} |