Created
September 16, 2016 21:13
-
-
Save bartkozal/4b7d9f6a61d0aa698ff869475f36880d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func composeMessage() { | |
let conversation = activeConversation | |
let session = conversation?.selectedMessage?.session ?? MSSession() | |
let layout = MSMessageTemplateLayout() | |
layout.image = UIImage(named: "message-background.png") | |
layout.imageTitle = "iMessage Extension" | |
layout.caption = "Hello world!" | |
layout.subcaption = "Sent by /(conversation?.localParticipantIdentifier)" | |
let message = MSMessage(session: session) | |
message.layout = layout | |
message.summaryText = "Sent Hello World message" | |
conversation?.insert(message) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment