0
故事板的自定義UI經常超時,所以我希望爲故事板和設備製作單獨的UI。我的問題是,如何知道drawRect
從storyboard
被執行Xcode
。故事板和自定義UI的drawRect控制流程
override func drawRect(rect: CGRect) {
let isStoryboard = ... //< How to know this is called for `storyboard` ?
if (isStoryboard) {
drawForStoryboard()
} else {
drawForCustomUI()
}
}