1
So this is my code: 
@IBOutlet weak var quoteLabel: UILabel!
var quotes = ["I am no 1", "I am no2", "I am no3"]
var currentQuoteIndex = 0 
@IBAction func forwardAction(_ sender: UIButton) {
            currentQuoteIndex += 1

    if currentQuoteIndex >= quotes.count

    {
        currentQuoteIndex = 0

    }

    quoteLabel.text = quotes[currentQuoteIndex]

}

@IBAction func backwardAction(_ sender: UIButton) {

    currentQuoteIndex -= 1
    if currentQuoteIndex < 0 {
        currentQuoteIndex = quotes.count - 1
    }
    quoteLabel.text = quotes[currentQuoteIndex]

}


@IBAction func shareButton(_ sender: Any) {



   let activityVC = UIActivityViewController(activityItems:     
   [self.quoteLabel.text!], applicationActivities: nil)

    activityVC.popoverPresentationController?.sourceView = self.view
    self.present(activityVC, animated: true, completion: nil)

}
}

So my questions are: 
No.1:  I want to add an alert message in share button so that any user who
 doesnt have facebook or any other social app connected to the app, would
get the warning message "You are not connected to Facebook". And every other 
social media apps such as twitter. 
No.2: I also want to add two more folders with the name "favorites" and 

“主页”,以便用户可以点击“收藏夹”按钮,报价直接添加到该“收藏夹”文件夹中,
屏幕上的书面消息“添加到收藏夹”。我还想添加一个“主页”按钮" 这样
当用户被带到显示两个文件夹的主屏幕时,即“引号”,通过点击可以让您看到
我放入应用程序的所有引号和第 2 个“收藏夹”文件夹这样用户喜欢的报价就会存储在那里,并且可以通过点击来访问。非常感谢您提前。

4

1 回答 1

0
  1. 这是不可能的,而且从用户体验的角度来看也没有任何意义,因为如果用户点击 Facebook 等,他可能已经收到该消息,而他可能不想与每个可能的来源共享并警告他没有登录很烦人。
  2. 你用UIActivity它。
于 2017-05-22T13:36:07.080 回答