swift - Estimote Nearables -
all,
i trying find proximity of nearable. constructing switch statement check if near, intermidetate, far etc. working in swift.
i have ranged nearable , in delegate method :
func nearablemanager(manager: estnearablemanager!, didrangenearable nearable: estnearable!) { self.nearable = nearable }
when try , zone doesn't find it, nearable.zone not found - don't know wrong. ideas ?
i had same problem. here so question
seems swift compiler doesn't want use zone
method reason assumes want call zone
method nsobject
, returns nszone *
struct , can not used in arc environment.
i fixed problem introducing category 1 new method returns value old one.
i added category bridging header. worked fine.
#import <estimotesdk/estimotesdk.h> @interface estnearable (ex) /// solving compiler problem "zone" method unavailable in swift @property (readonly) estnearablezone nearablezone; @end // implementation @implementation estnearable (ex) - (estnearablezone)nearablezone { return self.zone; } @end
after used nearablezone
method in swift
var zone = somenearable.nearablezone
Comments
Post a Comment