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
// | |
// Circle.h | |
// Shapes | |
// | |
// Created by Ian MacKinnon on 2015-06-18. | |
// Copyright (c) 2015 Ian MacKinnon. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "Shape.h" |
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
// | |
// CreatureProtocol.h | |
// Classroom | |
// | |
// Created by Ian MacKinnon on 2015-06-12. | |
// Copyright (c) 2015 Ian MacKinnon. All rights reserved. | |
// | |
@protocol CreatureProtocol <NSObject> |
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
// | |
// Classroom.h | |
// LighthouseClassroom | |
// | |
// Created by Ian MacKinnon on 2015-07-02. | |
// Copyright (c) 2015 Ian MacKinnon. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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 AreaCalculator : NSObject | |
+(float) calculateArea:(NSArray*)shapes; | |
@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
// | |
// main.m | |
// W1D4 | |
// | |
// Created by Ian MacKinnon on 2015-01-15. | |
// Copyright (c) 2015 Ian MacKinnon. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
// | |
// ViewController.m | |
// GestureRecognizers | |
// | |
// Created by Ian MacKinnon on 2014-10-16. | |
// Copyright (c) 2014 Ian MacKinnon. All rights reserved. | |
// | |
#import "ViewController.h" |
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
// | |
// ViewController.m | |
// PhotoExample | |
// | |
// Created by Ian MacKinnon on 2016-09-23. | |
// Copyright © 2016 Ian MacKinnon. All rights reserved. | |
// | |
#import "ViewController.h" |
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
if ([[UIApplication sharedApplication] respondsToSelector:@selector(isRegisteredForRemoteNotifications)]){ | |
// iOS 8 Notifications | |
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; | |
[[UIApplication sharedApplication] registerForRemoteNotifications]; | |
} else { | |
// iOS < 8 Notifications | |
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: | |
(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)]; | |
} |
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
// Set the application defaults | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"YES" | |
forKey:@"showTutorial"]; | |
[defaults registerDefaults:appDefaults]; | |
[defaults synchronize]; |
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
Basically, UIPasteBoard allows us to share data to other application. Below is an example of UIpasteBoard usage. | |
COPY | |
UIPasteboard *appPasteBoard = [UIPasteboard generalPasteboard]; | |
appPasteBoard.persistent = YES; | |
[appPasteBoard setString:@"STRING TO COPY"]; | |
PASTE |
NewerOlder