Chromo Chromo - 1 year ago 141
Swift Question

previewActionItems() removed in Xcode Beta 4

I just updated my Xcode to newest version of the Xcode 8 beta.
Now I opened one Project I'm currently working on.

I seems, that the method to register previewQuickActions has changed, because I get a error for overriding this, that it conflicts with a objc getter.

func previewActionItems() -> [UIPreviewActionItem] {
return ctrl.previewActionItems

I did some research on the internet, but did find any method to use or to implement to register previewActions.

I hope you can help me.

With regards

Answer Source

You'd better see an official documentation of previewActionItems.


var previewActionItems: [UIPreviewActionItem] { get }

(Some documentations may not be up to date, as Swift is changing too swift. But this description seems to be catching up beta 4.)

Try this:

override var previewActionItems: [UIPreviewActionItem] {
    return ctrl.previewActionItems

It may be hard to find with some simple keyword searches, but there are many similar articles in Stack Overflow...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download