Hello,
why there is no placeholderCell in SCArrayOfObjectsModel?
Thanks,
Urkman
UA-17470720-3
Posted 01 July 2013 - 11:26 AM
Hello,
why there is no placeholderCell in SCArrayOfObjectsModel?
Thanks,
Urkman
Posted 01 July 2013 - 02:07 PM
this should work
section.modelActions.didAddSection = ^(SCTableViewModel *tableModel, SCTableViewSection *section, NSUInteger sectionIndex) { SCArrayOfObjectsSection *objectsSection = (SCArrayOfObjectsSection *)section; objectsSection.placeholderCell = [SCTableViewCell cellWithText:@"Text" textAlignment:NSTextAlignmentCenter]; };
P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.
Posted 01 July 2013 - 10:39 PM
Hello ozie,
thanks for your reply, but it will not work.
Because I have no data, the didAddSection Action is not called
Greetings,
Urkman
Posted 15 November 2013 - 09:40 PM
ok so today i had the same problem, so i had a think, and this works just fine
obj.modelActions.didFetchItemsFromStore = ^(SCArrayOfItemsModel *itemsModel, NSMutableArray *items) { if ([items count] == 0) { SCArrayOfObjectsSection *s = [SCArrayOfObjectsSection section]; s.placeholderCell = [SCTableViewCell cellWithText:@"my empty cell text"]; [itemsModel addSection:s]; } };
P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.
0 members, 0 guests, 0 anonymous users