BOShareComposer 0.3.4

BOShareComposer 0.3.4

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布上次发布2016年7月
SPM支持SPM

Bruno Oliveira 维护。



 
依赖项
SnapKit= 0.21.1
Kanna~> 1.1
 

BOShareComposer

示例

非常简单,您只需要通过静态方法推送ViewController,并提供内容和选项。

 BOShareViewController
      .presentShareViewController(from: self,
                                  shareContent: shareContentWithoutMetaData,
                                  options: shareOptionsNoMetadata) { (completed, updatedContent) in
                                    print(updatedContent)
    }

分享选项

自定义弹出窗口的选项

public struct ShareOptions {

  // Buttons tint color
  public var tintColor: UIColor?

  // Composer title
  public var title: String

  // Dismiss button text
  public var dismissText: String

  // Completion button text
  public var confirmText: String

  // Parse link metadata and show image
  public var showMetadata = true

  // Keyboard appearence
  public var keyboardAppearance: UIKeyboardAppearance
}

分享内容

呈现给用户的内容

public struct ShareContent {
  // Starting text - and after a send is tapped the resulting text of user input
  public var text: String

  // If you want to specify a URL to the content - This url does no show in the editor
  // With this url the metadata will be fetched
  public let link: NSURL?

  // If you are sending a message to a specific user add it here
  public let destinationUserId: String?
}

安装

BOShareComposer可通过CocoaPods获得。要安装它,只需将以下行添加到您的Podfile中:

pod "BOShareComposer"

作者

Bruno Oliveira, [email protected]

许可证

BOShareComposer在MIT许可证下可获得。有关更多信息,请参阅LICENSE文件。