【问题标题】:share button and favorites folder in xcode 8xcode 8中的共享按钮和收藏夹文件夹
【发布时间】:2017-05-22 12:56:55
【问题描述】:
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 

“home”,以便用户可以点击“收藏夹”按钮,报价为 直接添加到“收藏夹”文件夹中,并附上书面信息
屏幕“添加到收藏夹”。我还想添加一个“主页按钮”,所以
当用户被带到显示两个文件夹的主屏幕时, 也就是说,“引号”通过点击可以让你找到所有的引号
我已放入应用程序和 2 号“收藏夹”文件夹中,以便引用 用户喜欢的内容存储在那里,可以通过点击访问。 非常感谢您。

【问题讨论】:

    标签: ios xcode social-networking socialshare action-button


    【解决方案1】:
    1. 这是不可能的,而且从用户体验角度来看也没有任何意义,因为如果用户点击 Facebook 等,他可能已经收到该消息,而他可能不想与每个可能的来源分享并警告他是不登录很烦人。
    2. 您为此使用 UIActivity

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多