Skip to content

Commit 9327773

Browse files
authored
Merge pull request #437 from Iterable/MOB-2484-modal-presentation-style
[MOB-2484] add setting for changing popup mode modal style
2 parents e985cba + b75273a commit 9327773

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

swift-sdk/IterableInboxViewController.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ open class IterableInboxViewController: UITableViewController {
111111
}
112112
}
113113

114+
/// when in popup mode, specify here if you'd like to change the presentation style
115+
public var popupModalPresentationStyle: UIModalPresentationStyle? = nil
116+
114117
/// Set this property to override default inbox display behavior. You should set either this property
115118
/// or `viewDelegateClassName`property but not both.
116119
public var viewDelegate: IterableInboxViewControllerViewDelegate? {
@@ -255,6 +258,7 @@ open class IterableInboxViewController: UITableViewController {
255258

256259
if let viewController = viewModel.createInboxMessageViewController(for: message, withInboxMode: inboxMode) {
257260
viewModel.set(read: true, forMessage: message)
261+
258262
if inboxMode == .nav {
259263
navigationController?.pushViewController(viewController, animated: true)
260264
} else {
@@ -376,6 +380,10 @@ open class IterableInboxViewController: UITableViewController {
376380
viewController.modalPresentationStyle = .overFullScreen
377381
return
378382
}
383+
384+
if let modalPresentationStyle = popupModalPresentationStyle {
385+
viewController.modalPresentationStyle = modalPresentationStyle
386+
}
379387
}
380388
}
381389

0 commit comments

Comments
 (0)