English 中文(简体)
分配给主要目标的份额
原标题:Share extension to Main target [closed]
  • 时间:2024-02-27 23:39:44
  •  标签:
  • ios
  • swift
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 8 mins ago.

我是新到迅速的,我挣扎要从份额延伸转向主要应用,我想提取图像,然后在主要应用中使用。

I ve tried instantiating the storyboard once I ve got my url, but I can t since they aren t in the same target.

问题回答

Please select the file and add it to your target. enter image description here

您可使用<条码>开放式URL:,从份额延伸到主要应用。

将这一职能称为控制员分担延期

func openContainerApp(with url: URL) async {
    guard let items = self.extensionContext?.inputItems as? [NSExtensionItem], !items.isEmpty else {
        return
    }

    defer {
        extensionContext?.completeRequest(returningItems: nil, completionHandler: nil)
    }

    let selector = sel_registerName("openURL:")

    var responder = self as UIResponder?
    while responder != nil {
        if responder!.responds(to: selector) {
            responder!.perform(selector, with: url)
            break
        }
        responder = responder?.next
    }
}

and main application can receive the url in app delegate func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签