This file contains hidden or 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
// | |
// BTConnectionHandler.swift | |
// AdTableTest | |
// | |
// Created by Paul Wilkinson on 24/06/2016. | |
// Copyright © 2016 Paul Wilkinson. All rights reserved. | |
// | |
import Foundation | |
import CoreBluetooth |
This file contains hidden or 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 | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
if let url = URL(string: "http://seemeclothing.xyz/service.php") { | |
This file contains hidden or 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 let receiptURL = NSBundle.mainBundle().appStoreReceiptURL { | |
print("Fetching local receipt") | |
if let receipt = NSData(contentsOfURL: receiptURL) { | |
print("fetched") | |
let b64 = receipt.base64EncodedStringWithOptions([]).stringByReplacingOccurrencesOfString("+", withString: "%2B") | |
self.validateReceipt(b64) | |
} else { | |
print("Could not retrieve app store receipt") | |
} | |
} else { |
This file contains hidden or 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.swift | |
// carouselTest | |
// | |
// Created by Paul Wilkinson on 28/09/2016. | |
// Copyright © 2016 Paul Wilkinson. All rights reserved. | |
// | |
import UIKit | |
import iCarousel |
This file contains hidden or 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 | |
let date = NSDate() | |
var dateArrayCalendar = [String]() | |
let components = NSCalendar.currentCalendar().components([.Day , .Month , .Year], fromDate: date) | |
let year = components.year | |
let month = components.month | |
let dateFormatatter = NSDateFormatter() | |
let day = 1 // Output is [2,3,4] | |
// let day = 0 than o/p [1,2,3,4,5] |
This file contains hidden or 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.swift | |
// TwoTables | |
// | |
// Created by Paul Wilkinson on 6/2/17. | |
// Copyright © 2017 Paul Wilkinson. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or 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 | |
// cvtest | |
// | |
// Created by Paul Wilkinson on 10/2/17. | |
// Copyright © 2017 Paul Wilkinson. All rights reserved. | |
// | |
#import "ViewController.h" |
This file contains hidden or 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.swift | |
// MapView_GoogleMaps | |
// | |
// Created by Timothy Hull on 2/26/17. | |
// Copyright © 2017 Sponti. All rights reserved. | |
// | |
import UIKit | |
import GooglePlaces |
This file contains hidden or 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.swift | |
// timertestswift | |
// | |
// Created by Paul Wilkinson on 2/3/17. | |
// Copyright © 2017 Paul Wilkinson. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or 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
enum Sex { | |
case Male | |
case Female | |
case Other | |
} | |
enum Size:Int { | |
case ExtraSmall = 0 | |
case Small = 1 | |
case Medium = 2 |