mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-07-07 05:15:07 +02:00
WIP: objc utilities
This commit is contained in:
@@ -412,10 +412,11 @@ extension Bool: SelectValueResultType {
|
||||
}
|
||||
|
||||
public static func fromResultObject(result: AnyObject) -> Bool? {
|
||||
|
||||
switch result {
|
||||
|
||||
case let decimal as NSDecimalNumber:
|
||||
// iOS: NSDecimalNumber(string: "0.5").boolValue // true
|
||||
// OSX: NSDecimalNumber(string: "0.5").boolValue // false
|
||||
return NSNumber(double: decimal.doubleValue).boolValue
|
||||
|
||||
case let number as NSNumber:
|
||||
|
||||
Reference in New Issue
Block a user