1
我想創建一個自定義的視圖,我需要關注。 根據許多來源,這是要走的路:canBecomeFocus on swift 3
override func canBecomeFocused() -> Bool {
return true
}
但是轉換爲雨燕3.0在此之後不再有效。 它引發錯誤:
Method does not override any method from its superclass.
如果我刪除重寫另一個錯誤被拋出:
Method 'canbecomeFocused()' with Objective-C selector 'canBecomeFocused' conflicts with better for 'canBecomeFocused' from superclass 'UIView' with the same Objective-C Selector.
無論如何,我可以做一個UIView
可選擇的TvOS?
在我的swift 3代碼我能夠覆蓋此屬性,所以請再試一次。 –
即時通訊將看我是否可以更新xCode。它是奇怪的我在8.0 beta 4 ..現在8.2(最新) –
我工作在Xcode 8及其工作。 –