我試圖陣列objects
傳遞到另一個視圖,我發現了以下錯誤:類型剪貼板在沒有構件「對象」迅速
Type Clipboard has no member
objects
這是我使用的代碼通過它:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
{
var Clipboard = segue.destinationViewController as! ClipBoard
var selectedIndexPath = tableView.indexPathForSelectedRow!
ClipBoard.objects = objects[selectedIndexPath.row]
}
我不知道這是否有差別,但我使用「自我」與物體之前用手從CloudKit
拉。
我從tableview UITableViewController的'CopyList'發送到UITableViewController'Clipboard' – Malorrr
您可以發佈您的'ClipBoard'類的代碼嗎? – Superian007
' 進口的UIKit 進口CloudKit 類剪貼板的UITableViewController { @IBOutlet弱VAR ClipBoardText:UITableView的! @IBOutlet weak var SaveButton:UIBarButtonItem! 倍率FUNC viewDidLoad中(){ super.viewDidLoad() self.navigationItem.rightBarButtonItem = SaveButton } @IBAction FUNC保存(發送方:AnyObject){ } 倍率FUNC didReceiveMemoryWarning() { super.didReceiveMemoryWarning() //處理任何可以重新創建的資源。 } }' – Malorrr