2

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 Chromo

Chromo
  • 77
  • 1
  • 8

1 Answers1

5

You'd better see an official documentation of previewActionItems.

Declaration

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...

OOPer
  • 47,149
  • 6
  • 107
  • 142
  • 1
    thanks for your answer, i was confused by the read-only modifier. And by the fact that i didn't know that you can override computed properties :) – Chromo Aug 03 '16 at 20:06