我有幾行代碼:中加入一些文字警報
let myAlert = UIAlertController(title: "Compiti trovati", message: "", preferredStyle: UIAlertControllerStyle.alert);
let okAction = UIAlertAction(title: "Ok", style: UIAlertActionStyle.default){ action in }
myAlert.addAction(okAction);
self.present(myAlert, animated: true, completion: nil);
我怎樣才能把警報消息在下面的代碼?
for index in 0...arr.count-1 {
print(MenuViewController.tasksArray[arr[index]].printTask())
}
我想在警報的消息中顯示數組arr[]
的所有元素。 在陣列有2個要素:
[
(104 - Interrogazione - Fisica - 10/08/2017 - Yoloooooo)
(115 - Compito - - 10/08/2017 - Commentoooooooo)
]
顯然沒有打印方法 – Marco
普萊斯e添加數組內容和預期結果的示例。 – vadian
這是內容:104 - Interrogazione - Fisica - 10/08/2017 - Yoloooooo 115 - Compito - - 10/08/2017 - 評論 – Marco