SVPullToRefresh
SVPullToRefresh copied to clipboard
update example with custom title and subtitle
Hi, thanks so much for this library. would it be possible to update your example to show how to add custom title and subtitle?
I'd like to add a subtitle that adds "Last refresh date:some-date".
I've tried using the setter methods setTitle, setSubtitle but am not having any luck. Oddly enough, they don't seem to be called, even though I'm calling them unless I call them from the action handler. I've tried to call them from my vc directly as well in my action block but no luck.
Note: this modification to the library works allows the method to work for setting the subtitle from my vc:
- (void)setSubtitle:(NSString *)subtitle forState:(SVPullToRefreshState)state { self.showsDateLabel = YES; //modified line (set to NO in init) .... }
Also - this still does not show the subtitle until it is run once. This produces the last refresh subtitle I would like, however, it does not show on first run. I'd like to also be able to set last refresh before they actually trigger a refresh. Is this possible?
any help would be appreciated. thanks!
Sorry, there was a bug that was preventing the setters from working properly. Fixed with my last commit.
not fixed
not fixed.