I need to detect right-clicks / two-finger clicks with a trackpad or mouse on an iPad inside an action extension.
I am finding that if I put a UITapGestureRecognizer in a view controller inside an action extension and set its allowedTouchTypes to UITouch.TouchType.indirectPointer, the gesture recognizer does not fire and none of the UIGestureRecognizerDelegate methods are ever called. The same code inside a standalone app works, just not in an action extension. This happens on both iPadOS 15.5 and iPadOS 16.
I can filed FB10296917 regarding this, but it seems odd enough that I wanted to ask here whether I might be missing something.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a List that can contain TextField views on macOS. I want tabbing between the TextField views inside the List to work the way it does with TextField views that are not inside a List. But pressing the tab key to navigate to a TextField inside a List just does not seem to work.
I tried attaching a focusable(false) modifier to the List and a focusable(true) modifier to the TextField views. Is there a trick to this?
var body: some View {
TextField("Title:", text: $title, prompt: Text("Title"))
List {
TextField("Title 2:", text: $title2, prompt: Text("Title 2"))
TextField("Title 3:", text: $title3, prompt: Text("Title 3"))
}
}
I am trying to address an issue with my app’s share sheet where, when the user sends a URL to either Apple Reminders or OmniFocus, the receiving app does not get a title. So I am updating my share sheet code to use UIActivityItemsConfiguration.
I have this code:
let title = "Golden Hill Software"
let url = URL(string: "https://www.goldenhillsoftware.com/")!
let itemProvider = NSItemProvider()
itemProvider.registerObject(ofClass: URL.self, visibility: .all) { (handler) in
handler(url, nil)
return nil
}
let config = UIActivityItemsConfiguration(itemProviders: [itemProvider])
config.metadataProvider = { (key) in
if key == .title || key == .messageBody {
return title
} else {
return nil
}
}
let viewController = UIActivityViewController(activityItemsConfiguration: config)
self.present(viewController, animated: true)
This works with some share sheet extensions. But when I choose the Ivory share extension, Ivory creates a post with a URL that starts with bplist…. When I choose the Open in Chrome action extension, Chrome says “Chrome cannot handle this link”.
Can someone help me understand what I am doing wrong here? (edited)
Topic:
UI Frameworks
SubTopic:
UIKit