In the Photos app on the iPhone, when you select the Mail sharing option, the photo animates into the modal view controller that slides up. How is it possible to modify the behaviour of the built-in UIActivities? For example, I'd like to be able to set the subject field of the mail composer.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
This is how I did it and it's working for me in iOS 7.
Create a class that conforms to the UIActivityItemSource protocol:
In the implementation override the relevant methods:
Then present the activity view controller:
Unfortunately, customizing the subject field of the
UIActivityViewController
mail composer is not working yet.There is a documented and reported bug regarding trying to customize this discussed here:
iphone - How do I set recipients for UIActivityViewController in iOS 6?
If this were working, according to the documentation, you would be able to customize these mail composer fields:
So using the mailto scheme, when it is working, you should be able to customize those fields like this:
If your looking for other ways to customize the
UIActivityViewController
there is an excellent example project here:https://github.com/russj/ios6ShareDemo