mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-14 21:23:43 +01:00
tidy up
This commit is contained in:
@@ -129,7 +129,6 @@ public final class DataStack {
|
||||
- parameter configuration: an optional configuration name from the model file. If not specified, defaults to `nil`.
|
||||
- returns: the `NSPersistentStore` added to the stack.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, renamed="beginUnsafe")
|
||||
public func addInMemoryStoreAndWait(configuration configuration: String? = nil) throws -> NSPersistentStore {
|
||||
|
||||
do {
|
||||
|
||||
@@ -20,7 +20,7 @@ class QueryingResultsViewController: UITableViewController {
|
||||
self.values = array.map { (item: AnyObject) -> (title: String, detail: String) in
|
||||
(
|
||||
title: item.description,
|
||||
detail: _stdlib_getDemangledTypeName(item)
|
||||
detail: String(reflecting: item.dynamicType)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class QueryingResultsViewController: UITableViewController {
|
||||
self.values = [
|
||||
(
|
||||
title: item.description,
|
||||
detail: _stdlib_getDemangledTypeName(item)
|
||||
detail: String(reflecting: item.dynamicType)
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class ListObserverDemoViewController: UITableViewController, ListSectionObserver
|
||||
UIBarButtonItem(
|
||||
barButtonSystemItem: .Trash,
|
||||
target: self,
|
||||
action: "resetBarButtonItemTouched:"
|
||||
action: #selector(self.resetBarButtonItemTouched(_:))
|
||||
)
|
||||
]
|
||||
|
||||
@@ -96,13 +96,13 @@ class ListObserverDemoViewController: UITableViewController, ListSectionObserver
|
||||
title: Static.filter.rawValue,
|
||||
style: .Plain,
|
||||
target: self,
|
||||
action: "filterBarButtonItemTouched:"
|
||||
action: #selector(self.filterBarButtonItemTouched(_:))
|
||||
)
|
||||
navigationItem.rightBarButtonItems = [
|
||||
UIBarButtonItem(
|
||||
barButtonSystemItem: .Add,
|
||||
target: self,
|
||||
action: "addBarButtonItemTouched:"
|
||||
action: #selector(self.addBarButtonItemTouched(_:))
|
||||
),
|
||||
filterBarButton
|
||||
]
|
||||
|
||||
@@ -60,7 +60,10 @@ class TransactionsDemoViewController: UIViewController, MKMapViewDelegate, Objec
|
||||
|
||||
super.viewDidLoad()
|
||||
|
||||
let longPressGesture = UILongPressGestureRecognizer(target: self, action: "longPressGestureRecognized:")
|
||||
let longPressGesture = UILongPressGestureRecognizer(
|
||||
target: self,
|
||||
action: #selector(self.longPressGestureRecognized(_:))
|
||||
)
|
||||
self.mapView?.addGestureRecognizer(longPressGesture)
|
||||
|
||||
Static.placeController.addObserver(self)
|
||||
@@ -68,7 +71,7 @@ class TransactionsDemoViewController: UIViewController, MKMapViewDelegate, Objec
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(
|
||||
barButtonSystemItem: .Refresh,
|
||||
target: self,
|
||||
action: "refreshButtonTapped:"
|
||||
action: #selector(self.refreshButtonTapped(_:))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -380,9 +380,7 @@ class CoreStoreTests: XCTestCase {
|
||||
do {
|
||||
|
||||
let fileManager = NSFileManager.defaultManager()
|
||||
try fileManager.removeItemAtURL(
|
||||
fileManager.URLsForDirectory(deviceDirectorySearchPath, inDomains: .UserDomainMask).first!
|
||||
)
|
||||
try fileManager.removeItemAtURL(defaultRootDirectory)
|
||||
}
|
||||
catch _ { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user