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
// | |
// MNGRecorderHandler.swift | |
// | |
// | |
// Created by Tommie Carter on 6/29/15. | |
// Copyright © 2015 MING Technology. All rights reserved. | |
// | |
import AVFoundation | |
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
// | |
// MNGWaveformView.swift | |
// | |
// | |
// Created by Tommie Carter on 6/29/15. | |
// Copyright © 2015 MING Technology. All rights reserved. | |
// | |
import UIKit |
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
// | |
// VideoPlayerViewController.swift | |
// | |
// | |
// Created by Tommie Carter on 7/8/15. | |
// Copyright © 2015 MING Technology. All rights reserved. | |
// | |
import UIKit | |
import AVKit |
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
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(handleKeyboardDidShowNotification:) | |
name:UIKeyboardDidShowNotification | |
object:nil]; | |
- (void)handleKeyboardDidShowNotification:(NSNotification *)notification | |
{ | |
NSDictionary* info = [notification userInfo]; | |
CGSize keyboardSize = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size; |
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
// | |
// StarRatingControl.swift | |
// ths | |
// | |
// Created by Tommie Carter on 7/13/15. | |
// Copyright © 2015 MING Technology. All rights reserved. | |
// | |
import UIKit |
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 you have a Time Machine backup, you need this support page: | |
https://support.apple.com/kb/PH18848?locale=en_GB | |
If not, then you'll need to make a Yosemite USB installer of at least 8GB. (a USB3 one will be much quicker). | |
First download the OS X 10.10 Yosemite installer from the Mac App Store in the Purchases section (you may need to hold alt/option while selecting Purchases. Once it's downloaded, just quit the installer and set the downloaded file's name to InstallOSXYosemite.app (make sure only .app, not .app.app) | |
Plug in your USB drive into the computer and open Disk Utility (in Applications). | |
Select the USB drive from the left sidebar and click on Erase tab. | |
Choose Mac OS Extended (Journaled) in the format box and set the name be YosemiteInstaller |
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
extension NSData { | |
func mng_enumerateComponentsSeparatedBy(delimiter:NSData, block:(data:NSData,finalBlock:Bool) -> () ){ | |
var loc:Int = 0 | |
while true { | |
let rangeOfNewline = self.rangeOfData(delimiter, options: NSDataSearchOptions.Anchored, range:NSMakeRange(loc, self.length - loc)) | |
if rangeOfNewline.location == NSNotFound { | |
break | |
} |
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
class CoreDataStackManager { | |
// MARK: Properties | |
static let sharedManager = CoreDataStackManager() | |
static let applicationDocumentsDirectoryName = "com.example.apple-samplecode.Earthquakes" | |
static let mainStoreFileName = "Earthquakes.storedata" | |
static let errorDomain = "CoreDataStackManager" | |
/// The managed object model for the application. | |
lazy var managedObjectModel: NSManagedObjectModel = { |
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
//Source (http://christiantietze.de/posts/2015/10/results-from-fetch-requests/) | |
import Foundation | |
import CoreData | |
enum CoreDataError: ErrorType { | |
case InconsistentCoreDataFetchRequestResults | |
} |
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
// | |
// MNGNSFRVC.swift | |
// ProjectX | |
// | |
// Created by Tommie N. Carter, Jr., MBA on 11/15/15. | |
// Copyright © 2015 MING Technology. All rights reserved. | |
// | |
import UIKit | |
import CoreData |