override func prepareForSegue(segue: UIStoryboardSegue!,sender: AnyObject!) { let senderIsBonusProduct = sender is Xyz
但我得到以下错误:
Could not find a user-defined conversion from type ‘Int1’ to type ‘Bool’
解决方法是:
let bonus = (sender is Xyz ? true : false)