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 Array { | |
/** | |
Insert an element at a position ordered. | |
Precondition: the array must be already sorted. | |
- parameter element: element to insert | |
- parameter orderedBy: This block must return $0 < $1 | |
*/ | |
mutating func insert(ordered element: Element, orderedBy: (_ A: Element, _ B: Element) -> Bool) { | |
var low = 0 | |
var high = self.count - 1 |
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
// | |
// Observable.swift | |
// TestObservable | |
// | |
// Created by Daniel Vela on 13/03/2018. | |
// Copyright © 2018 veladan. All rights reserved. | |
// | |
// | |
// https://colindrake.me/post/an-observable-pattern-implementation-in-swift/ | |
// |
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
/ | |
// TransparentTableViewCell.swift | |
// OSFramework | |
// | |
// Created by Daniel Vela on 29/04/2017. | |
// Copyright © 2017 Daniel Vela. All rights reserved. | |
// | |
class TransparentTableViewCell: UITableViewCell { | |
override func awakeFromNib() { |
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
// | |
// OSEditableTableViewController.swift | |
// mavlink | |
// | |
// Created by Daniel Vela on 26/06/16. | |
// Copyright © 2016 Daniel Vela. All rights reserved. | |
// | |
protocol OSDataSource { | |
func count() -> Int |
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
// | |
// OSCircleImageView.swift | |
// CircleImageProject | |
// | |
// Created by Daniel Vela on 15/04/16. | |
// Copyright © 2016 Daniel Vela. All rights reserved. | |
// | |
@IBDesignable | |
class OSCircleImageView: UIImageView { |
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
// | |
// OSCircleLabel.swift | |
// CircleImageProject | |
// | |
// Created by Daniel Vela on 15/04/16. | |
// Copyright © 2016 Daniel Vela. All rights reserved. | |
// | |
@IBDesignable | |
class OSCircleLabel: UILabel { |
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
// | |
// OSiCloudDataBackup.swift | |
// OSFramework | |
// | |
// Created by Daniel Vela on 20/09/2016. | |
// Copyright © 2016 Daniel Vela. All rights reserved. | |
// | |
/** | |
Delegate of class OSiCloudDataBackup. Methods are called to indicate a |
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
// | |
// CoreDataStack.swift | |
// iOS-Boilerplate | |
// | |
// Created by Daniel Vela Angulo on 23/11/2018. | |
// Copyright © 2018 veladan. All rights reserved. | |
// | |
import CoreData | |
import Foundation |
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
// | |
// SimplePersistence.swift | |
// OSFramework | |
// | |
// Created by Daniel Vela on 06/02/2017. | |
// Copyright © 2017 Daniel Vela. All rights reserved. | |
// | |
import Foundation |