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
// Position Variables | |
var x = 0; | |
var y =0; | |
var initial_x = 169; | |
var initial_y = 111; | |
// Speed - Velocity | |
var vx = 0; | |
var vy = 0; |
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
// | |
// PlaceMark.h | |
// Nina | |
// | |
// Created by Ian MacKinnon on 11-08-22. | |
// Copyright 2011 __MyCompanyName__. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <MapKit/MapKit.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 <UIKit/UIKit.h> | |
@interface CreateImageViewController : UIViewController<UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate> | |
@property(nonatomic, strong) IBOutlet UIImageView *imageView; | |
@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
// | |
// TunesTableViewController.m | |
// ItunesPlay | |
// | |
// Created by Ian MacKinnon on 2014-08-17. | |
// Copyright (c) 2014 Ian MacKinnon. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
#import <MediaPlayer/MediaPlayer.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
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 |
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
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
// | |
// 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
// | |
// 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
// | |
// main.m | |
// W1D4 | |
// | |
// Created by Ian MacKinnon on 2015-01-15. | |
// Copyright (c) 2015 Ian MacKinnon. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
OlderNewer