Reputation: 1491
I'm working on an iOS Action Extension that's capable of showing an SKStoreProductViewController
. Action Extensions are capable of showing in two sizes, either full screen (NSExtensionActionWantsFullScreenPresentation
set to YES
) or in a small centered window in the screen (set to NO
). I'm opting for the minimal window in the middle, my extension doesn't warrant use of the full screen.
When I show an SKStoreProductViewController
modally within my extension as prescribed it ends up large and clipped in the center of the action extension. Has anybody else encountered this or found a way around it?
Upvotes: 0
Views: 397
Reputation: 76
With NSExtensionActionWantsFullScreenPresentation
set to YES
, the extension behaves like a UIModalPresentationStyleFormSheet
thus:
override func viewDidLoad() {
super.viewDidLoad()
preferredContentSize = CGSize(width: 540, height: 620)
}
Note that the extension is displayed full screen on an iPhone (as expected).
References:
Upvotes: 1