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
// | |
// Network.swift | |
// Kirina | |
// | |
// Created by Arash Kashi on 2017-12-11. | |
// Copyright © 2017 Arash Kashi. All rights reserved. | |
// | |
import Foundation | |
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
extension Notification.Name { | |
public static let SentEvent = Notification.Name("SentEvent") | |
} | |
class MyApplication: UIApplication { | |
override func sendEvent(_ event: UIEvent) { |
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 Notification.Name { | |
public static let ProlongedInactivity = Notification.Name("ProlongedInactivity") | |
} | |
class UserInactivityDetector { | |
var idleTimeAllowed: TimeInterval = 30 { | |
didSet { |
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 UIViewController { | |
var uniqueId: String { | |
return "\(ObjectIdentifier(self).hashValue)" | |
} | |
} |
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
// | |
// FetchResultsControllerWithCollectionView.swift | |
// CoreStore | |
// | |
// Created by Arash Kashi on 2/23/17. | |
// Copyright © 2017 Arash K. All rights reserved. | |
// | |
import Foundation | |
import CoreData | |
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
#!/bin/bash | |
TARGET="Your App" | |
CONFIGURATION="Release" | |
SDK="iphoneos" | |
PROFILE_PATH="/Users/jkp/Desktop/foo.mobileprovision" | |
IDENTITY="iPhone Distribution: Your Company Ltd" | |
KEYCHAIN="/Users/jkp/Desktop/keychain" | |
PASSWORD="foobar" |
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 | |
import Foundation | |
enum PipableOperationOutput<T> { | |
case success(T) | |
case fail(Error) | |
} |
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
infix operator --> :AdditionPrecedence | |
enum Result<T> { | |
case success(T) | |
case fail(Error) | |
} | |
func --><InA, InAEnv,OutAEnv ,OutBEnv , OutA, OutB> | |
(first: @escaping ( InAEnv? , InA , @escaping (OutAEnv?, Result<OutA>) -> () ) -> (), | |
second: @escaping (OutAEnv? , OutA, @escaping (OutBEnv?, Result<OutB>) -> () ) -> ()) -> |
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 | |
import CoreData | |
public protocol FetchedResultsDelegate { | |
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: AnyObject) -> UITableViewCell | |
} | |
public class FetchedResultsDataSource: NSObject, UITableViewDataSource, NSFetchedResultsControllerDelegate { | |
public weak var tableView: UITableView? |