CPSearch
@objc
public class CPSearch : NSObject
Contains necessary information when search will be used.
-
Tells which keyword will be searched in the specified field type.
Declaration
Swift
@objc public var filter: CPSearchFilter
-
Sorts result according to the specified field type. If any field type not specified, will be same with the filter field type in the initialization phase.
Declaration
Swift
@objc public var sortBy: CPAddressBook.FieldType
-
Orders results according to the specified type. Default value is ascending.
Declaration
Swift
@objc public var orderBy: CPAddressBook.OrderType
-
Specifies the maximum number of contacts will return from the result. If search query has more than specified limit, can be check hasNext property of the CPSearchResult object to get next chunk of results.
Declaration
Swift
@objc public var limit: Int
-
Specifies which directory will be searched Default value is “default”
Declaration
Swift
@objc public var directoryId: String
-
Initializes with the specified CPSearchFilter object
Declaration
Swift
@objc public init(filter: CPSearchFilter)
Parameters
filter
CPSearchFilter object which contains keyword and the field of search.