测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
发布最新版本 | 2017年7月 |
由 Diego Merks 维护。
[](https://travis-ci.org/Diego Merks/mobfirst-vtex-filters-pod)
Filter *filter1 = [[Filter alloc] initWithStoreUrl:@"http://estoque.com.br" andCategory:@"/infantil/"];
[filter1 getFacetsFromStoreWithCompletionHandler:^(FacetsReturnObject *facetsReturnObject) {
Brand *brand = [[facetsReturnObject brands] objectAtIndex:0];
Brand *brand2 = [[facetsReturnObject brands] objectAtIndex:2];
[brand setState:YES];
[brand2 setState:YES];
SpecificationFilter *filter = [[facetsReturnObject specificationFilters] objectAtIndex:1];
SpecificationFilterItem *azul = [[filter specificationFilterItems] objectAtIndex:0];
SpecificationFilterItem *branco = [[filter specificationFilterItems] objectAtIndex:1];
[azul setState:YES];
[branco setState:YES];
NSMutableArray *filterItems = [[NSMutableArray alloc] init];
[filterItems addObject:azul];
[filterItems addObject:branco];
SpecificationFilter *enabledSpecificationFilters = [[SpecificationFilter alloc] initWithName:@"Cor" andItems:filterItems];
NSArray *specificationFiltersArray = [NSArray arrayWithObject:enabledSpecificationFilters];
NSMutableArray *brandArray = [NSMutableArray arrayWithObject:brand];
[brandArray addObject:brand2];
FacetsReturnObject *enabledFilters = [[FacetsReturnObject alloc] initWithBrands:brandArray specificationFilters:specificationFiltersArray andChildCategories:nil];
NSString *url = [filter1 getUrlFromFilters:enabledFilters withTextFilter:nil];
printf("%s", [url UTF8String]);
}];
mobfirst-vtex-filters-pod 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod "mobfirst-vtex-filters-pod"
Diego Merks, [email protected]
mobfirst-vtex-filters-pod 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。