我试图在iMessage贴纸应用程序中添加一个链接。链接打开itunes贴纸商店页面。当我在MessagesViewController.swift文件中添加这些代码时,出现错误“'共享'不可用:在适当情况下使用基于视图控制器的解决方案”。如何正确添加链接?Swift 3:如何在imessage中添加链接?
func clickMe(sender:UIButton!)
{
UIApplication.shared.open(URL(string: "itms-apps://itunes.apple.com/app/id11111111")!)
print("Button Clicked")
}
MessagesViewController是UIViewViewContoller的子类吗? – iMuzahid