mirror of
https://github.com/TermiT/Flycut.git
synced 2025-10-06 20:05:49 +08:00
Modify InAppSettingsKit to recognize a Key key on Group elements allowing the footer text to be pulled from UserDefaults as an alternative to the FooterText key.
This commit is contained in:
parent
189bd3ce82
commit
6f72517444
1 changed files with 6 additions and 1 deletions
|
@ -476,7 +476,12 @@ CGRect IASKCGRectSwap(CGRect rect);
|
||||||
|
|
||||||
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
|
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
|
||||||
{
|
{
|
||||||
NSString *footerText = [self.settingsReader footerTextForSection:section];
|
IASKSpecifier *specifier = [self.settingsReader headerSpecifierForSection:section];
|
||||||
|
NSString *key = (nil == specifier
|
||||||
|
|| ![specifier.type isEqualToString:kIASKPSGroupSpecifier])
|
||||||
|
? nil
|
||||||
|
: specifier.key;
|
||||||
|
NSString *footerText = [self.settingsReader titleForId:(nil != key && [self.settingsStore objectForKey:key] != nil) ? [self.settingsStore objectForKey:key] : specifier.footerText];
|
||||||
if (_showCreditsFooter && (section == [self.settingsReader numberOfSections]-1)) {
|
if (_showCreditsFooter && (section == [self.settingsReader numberOfSections]-1)) {
|
||||||
// show credits since this is the last section
|
// show credits since this is the last section
|
||||||
if ((footerText == nil) || ([footerText length] == 0)) {
|
if ((footerText == nil) || ([footerText length] == 0)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue