You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
import Social
|
|
|
|
|
|
|
|
import SignalMessaging
|
|
|
|
import PureLayout
|
|
|
|
|
|
|
|
class ShareViewController: SLComposeServiceViewController {
|
|
|
|
|
|
|
|
override func viewDidLoad() {
|
|
|
|
super.viewDidLoad()
|
|
|
|
let someView = UIView()
|
|
|
|
someView.backgroundColor = UIColor.green
|
|
|
|
view.addSubview(someView)
|
|
|
|
someView.autoPinEdgesToSuperviewEdges()
|
|
|
|
self.placeholder = StorageCoordinator.shared.path
|
|
|
|
}
|
|
|
|
|
|
|
|
override func isContentValid() -> Bool {
|
|
|
|
// Do validation of contentText and/or NSExtensionContext attachments here
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
override func didSelectPost() {
|
|
|
|
// This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments.
|
|
|
|
|
|
|
|
// Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context.
|
|
|
|
self.extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
|
|
|
|
}
|
|
|
|
|
|
|
|
override func configurationItems() -> [Any]! {
|
|
|
|
// To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here.
|
|
|
|
return []
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|