swift - CLFloor returning nil in iOS 8 -
swift - CLFloor returning nil in iOS 8 -
so trying clfloor in core location give me info instead of returning nil in swift, have not been able to. have tried own code , next nshipster:
import corelocation class locationmanagerdelegate: nsobject, cllocationmanagerdelegate { func locationmanager(manager: cllocationmanager!, didupdatelocations locations: anyobject[]!) { allow location: cllocation? = locations[0] as? cllocation if allow floor: clfloor? = location?.floor { println("current floor: \(floor?.level)") } } } allow manager = cllocationmanager() manager.delegate = locationmanagerdelegate() manager.startupdatinglocation()
does know how create work on device or in simulator, i'm sure reply benefit lot of people. if knows of resources on or clvisit, helpful.
based on these 2 links apple's website
clfloor ref
clloaction class ref
discussion if floor info not available current location, value of property nil.
i'm not expert in swift think returns nil perchance means there no floor info @ location.
ios swift core-location ios8
Comments
Post a Comment