ios - ReactiveCocoa nested map -
[[[[[self.textfield.rac_textsignal throttle:0.5] flattenmap:^racstream *(id value) { //call api return [api signal]; }] flattenmap:^racstream *(nsarray *result) { result = [result.rac_sequence take:150].array; //result json array return result; }] map:^id (nsarray *result) { return [result.rac_sequence map:^id (json *r) { //handle json item return item; }].array; }] subscribenext:^(nsarray *result) { //reload ui } error:^(nserror *error) { } completed:^{ }];
how avoid nested map in signal sequence? better way handle this?
Comments
Post a Comment