futuretap/InAppSettingsKit

FooterText not wrapping

CrewNerd opened this issue · 15 comments

I just upgraded from 3.0.1 to 3.3.5 and the only regression I've noticed is that my FooterText no longer line-wraps. It looks like vertical space is still being reserved as though the text would be wrapped, but it just runs off the end of the first line with an ellipsis.

Presumably, this impacts HeaderText as well, but I haven't checked this. I'm testing on iOS 15.1.

Update: further testing showed that the regression occurred between version 3.3.1 and 3.3.2.

Only change from 3.3.1 to 3.3.2 was to allow .insetGrouped table view style, which should be purely additional. Can you provide a sample app reproducing the issue?

Not easily, but with some experimenting, I tracked the regression down to the change in IASKAppSettingsViewController.m at line 916 in this commit. If I revert that one change, my footer text wraps correctly.

The problem is I can't reproduce the problem here. My footer text still wraps fine. And we need the change in that commit in order to support a non-plain UITableViewStyle in child panes (we want to create child panes with the same UITableViewStyle as the parent).

How do you integrate IASK? Which UITableViewStyle are you using?

I have a XIB file with my app's main tab controller, tabs, and child view controllers. Under the settings tab, the view controller's class is IASKAppSettingsViewController and I wire up a reference to that in my app delegate. The view controller delegate is also wired to my app delegate to handle button presses and other customizations.

I'm afraid, we need a sample app to reproduce the problem.

My root table style is Plain (the default). If I hack the code to force the child view style to be Grouped, then the footer text wraps properly in the new child view. So it looks like the problem occurs with FooterText when the style is Plain, but I don't think I can set that since the activation happens as part of the XIB loading.

You should be able to set the table view to grouped in the storyboard.

It's a XIB, though, not a storyboard. When the XIB loads, the view controller is initialized with initWithCoder. Shouldn't the default style be Grouped? If I tried to call initWithStyle with style=Plain, I'd get a warning, so that shouldn't be the default when loading a XIB.

Should there be another IBInspectable property on IASKAppSettingsViewController to allow the table style to be set?

Shouldn't matter. Just set the style of the table view to grouped in IB.

I'm not seeing all of the table view properties there. I don't see anywhere to set the table style in IB. The only properties I see are the three defined in IASKAppSettingsViewController.h (showDoneButton, neverShowPrivacySettings, and cellLayoutMarginsFollowReadableWidth)

Properties from UIViewController are also settable in IB, but not for UITableViewController.

You should have a UITableView object inside the UITableViewController.

Not sure what you're getting at. Sure, there's a UITableView object there, but the style property is read-only and I can't get IB to show me that property. Here's what the property inspector looks like for the app settings view controller
xcode
.

I can set the style to Grouped:
image

Problem solved - I had to remove my IASKAppSettingsViewController from the hierarchy in IB and add it back again. Then, I finally got a table view in the tree that I could set properties on. Thanks for your help!