Download SDK versioning
Download demo project
-all_load in Other Linker Flags MilpixSDK.h either in the project .pch file or in each file calling the SDK classes. Is called to get a unique instance of the search manager.
[PXSearchManager sharedSearchManager];
This is done by calling the pxStartPicSearchFromCameraWithFilters method. Filters can be set to choose the language and the layer to search in.
pxStartPicSearchFromCameraWithFilters:(NSDictionary*)filters delegate:(id<PXSearchDelegate>)delegate
Search results are returned as an array through the given delegate. If the camera is not available an alert pop-up is displayed and the gallery is started for the user to choose an existing picture.
Parameters
filters : a dictionary that contain the following search parameters :
NSArray* layers = [NSArray arrayWithObject:@"myLayer"]; NSDictionary* filters = [NSDictionary dictionaryWithObjectsAndKeys:@"fr",@"language",layers,@"layers",nil]; PXSearchManager* searchManager = [PXSearchManager sharedSearchManager]; [searchManager pxStartPicSearchFromCameraWithFilters:filters delegate:self];
Choosing default camera
You can choose the intially used camera (front or rear camera) by changing useFrontalCamera value.
PXSearchManager* searchManager = [PXSearchManager sharedSearchManager]; searchManager.useFrontalCamera = NO;
pxStartPicSearchFromGalleryWithFilters method. The usage is the same as the pxStartPicSearchFromCameraWithFilters method.
The method pxSearchEndedWithResults is called when a search has completed successfully.
PxSearchEndedWithResults:(NSArray*)results
If search fails, the method pxSearchFailed is called.
pxSearchFailed
The structure of the result object is defined by Milpix SA. Be careful to catch the possible absence of some fields depending on the returned object type.
User interface can be customized by calling pxSetTheme:andColor method.
pxSetTheme:(PXTheme)theme andColor:(UIColor*)colorOrNil
Theme can be any of these two values :
We hope the SDK will deliver the best for your business and we deeply thank you for your interest in our products. Do not hesitate to contact us via the help button on the right side.