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 | |
import UIKit | |
class RegionTest { | |
var region: CGPath! | |
var points = [CGPoint]() | |
init?() { | |
guard let regionCoordinates = self.loadJson(filename:"pointlist"), |
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
func doSetup(){ | |
service = CBMutableService(type: CBUUID(string: "00001000-0000-1000-8000-00805F9B34FB"), primary: true) | |
characteristic = CBMutableCharacteristic(type: CBUUID(string: "00001001-0000-1000-8000-00805F9B34FB"), properties: [CBCharacteristicProperties.read, CBCharacteristicProperties.write, CBCharacteristicProperties.notify], value: nil, permissions: [CBAttributePermissions.readable, CBAttributePermissions.writeable]) | |
service?.characteristics = [characteristic!] | |
peripheralManager?.add(service!) | |
} | |
func startAdvertising { | |
peripheralManager?.startAdvertising([CBAdvertisementDataLocalNameKey: UIDevice.current.name, CBAdvertisementDataServiceUUIDsKey: [CBUUID(string: "00001000-0000-1000-8000-00805F9B34FB")]]) | |
NSLog("Started advertising") |
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
class Father { | |
public func doSomething() { | |
print("Did the father thing") | |
} | |
} | |
class Child: Father { | |
@available (*, unavailable) | |
override func doSomething() { | |
print("did the child thing") |
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 url = URL(string: "https://www.agoda.com/pages/agoda/default/DestinationSearchResult.aspx?pcs=1&cid=1807795&hl=en&city=16594") { | |
UIApplication.shared.open(url, options: [:], completionHandler: nil) | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>$(DEVELOPMENT_LANGUAGE)</string> | |
<key>CFBundleExecutable</key> | |
<string>$(EXECUTABLE_NAME)</string> | |
<key>CFBundleIdentifier</key> | |
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
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
extension Dictionary where Key == String { | |
func isNullOrEmpty(key: String) -> Bool { | |
guard let value = self[key] else { | |
return true | |
} | |
if value as? NSNull == NSNull() { | |
return true |
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
// | |
// CircularTimerView.swift | |
// ProgressView | |
// | |
// Created by Paul Wilkinson on 26/11/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
// | |
// GroupClassModel.h | |
// GCM | |
// | |
// Created by Paul Wilkinson on 13/10/17. | |
#import <Foundation/Foundation.h> | |
@interface GroupClassModel: NSObject | |
@property (strong, nonatomic) NSString *id; |
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
// | |
// PhoneCallObserver.swift | |
// | |
// Created by Paul Wilkinson on 27/9/17. | |
// Copyright © 2017 Paul Wilkinson. All rights reserved. | |
// | |
import UIKit | |
import CallKit |
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
// | |
// main.swift | |
// SearchTest | |
// | |
// Created by Paul Wilkinson on 22/8/17. | |
// Copyright © 2017 Paul Wilkinson. All rights reserved. | |
// | |
import Foundation |