CoreDataStructures
概述
CoreDataStructures是用Swift 5编写的根本数据结构的库,因此需要一个xcode 10.0+来进行项目构建。实际组件可以在CoreDataStructures/CoreDataStructures/Classes/目录中找到。
用法
import UIKit
import CoreDataStructures
class WelcomeViewController: UIViewController {
var xStack: Stack<Double> = Stack<Double>()
var xBST: BinarySearchTree<Int> = BinarySearchTree<Int>()
var xQueue: Queue<Float> = Queue<Float>()
var xLinkedList: LinkedList<Double> = LinkedList<Double>()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
示例
要运行示例项目,请先克隆仓库,然后在Example目录中运行 pod install
命令。
要求
- iOS 12.0
- Swift 5
安装
CoreDataStructures 可通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod 'CoreDataStructures'
作者
Michael Cordero,[email protected]
许可
CoreDataStructures 在 MIT 许可下提供。更多信息请参阅 LICENSE 文件。