LCLiveQuery
Objective-C
@interface LCLiveQuery : NSObject
Swift
class LCLiveQuery : NSObject
A type that defines an object which can observe various kinds of change events of objects that a query matches.
-
The delegate which receive change event of objects which the query matches.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<LCLiveQueryDelegate> delegate;
Swift
weak var delegate: LCLiveQueryDelegate? { get set }
-
Subscribe change notifications for query.
Declaration
Objective-C
- (void)subscribeWithCallback:(nonnull void (^)(BOOL, NSError *_Nonnull))callback;
Swift
func subscribe(callback: @escaping (Bool, Error) -> Void)
Parameters
callback
The callback block of subscription.
-
Unsubscribe change notifications for query.
Declaration
Objective-C
- (void)unsubscribeWithCallback:(nonnull void (^)(BOOL, NSError *_Nonnull))callback;
Swift
func unsubscribe(callback: @escaping (Bool, Error) -> Void)
Parameters
callback
The callback block of unsubscription.