Closed furiosFast closed 3 years ago
Hi @furiosFast,
Due to a recent bug report (https://github.com/SvenTiigi/WhatsNewKit/issues/45) the padAdjustment
closure has been refactored to be only used to update the layout insets.
Therefore changing the detailButton
to nil will have no effect inside the padAdjustment
closure.
If you wish to hide the detailButton
on an iPad you could update your WhatsNewKit configuration to something like this:
var configuration = WhatsNewViewController.Configuration()
configuration.detailButton = {
if UIDevice.current.userInterfaceIdiom == .pad {
return nil
} else {
return WhatsNewViewController.DetailButton(title: ..., action: ...)
}
}()
But I will try to fix this misleading behavior within the next release of WhatsNewKit ✌️
ok, thank you!!
Updated README.md
(https://github.com/SvenTiigi/WhatsNewKit/commit/773210d5876a567d3e19b3f38caae2f27e98a1e6) and added corresponding hint for this issue.
hi, even moving the lines of code however the customization for ipad does not work
configuration.padAdjustment = { configuration in
WhatsNewViewController.Configuration.defaultPadAdjustment(&configuration)
configuration.detailButton = nil
configuration.itemsView.insets.top = -20.0
configuration.itemsView.insets.left = 5.0
configuration.itemsView.insets.right = 7.0
configuration.itemsView.insets.bottom = 5.0
}
WhatsNewKit Environment
What did you do?
I've added this code for ipad adjustments:
but it doesn't works. For example the detail button is still visible.