2014-07-03 18 views
0

我已經設置了從UIButton繼續運行,它工作正常,但是我在TableViewCell上設置的繼續不起作用。Segue沒有從Swift中的TableViewCell中發射

TableViewCell突出觸摸,但segue不會觸發。 TableViewCell高光灰色,但我將它設置爲藍色。

該segue是一個選擇推塞格。

我已經在Objective-C中做了很多次,沒有任何問題,爲什麼它不能在Swift中工作。

希望有人能幫助我。

+0

我認爲灰色單元格的東西是一個測試版問題 - 我也看到了。提出一個與蘋果的錯誤:http://bugreport.apple.com/ –

+0

「不行」,你的意思是prepareForSegue()永遠不會被調用它嗎? – NRitH

+0

是的prepareForSegue永遠不會被調用。 – mickhsmith

回答

1

我已經改變了以下解決我的問題: -

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell 
{ 
    let cell:UITableViewCell = UITableViewCell(style:UITableViewCellStyle.Default, reuseIdentifier:"categorycell") 
} 

改爲: -

override func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath?) -> UITableViewCell? 
{ 
     let cell = tableView!.dequeueReusableCellWithIdentifier("categorycell", forIndexPath: indexPath) as UITableViewCell 
} 

和SEGUE現在閃光。

感謝大家誰試圖幫助。