sto controllando per vedere se è stato selezionato un elemento'Set <NSObject>' non ha un membro denominato 'ANYOBJECT "-.. Xcode 6.3
func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent)
{
// First, see if the game is in a paused state
if !gamePaused
{
// Declare the touched symbol and its location on the screen
let touch = touches.anyObject! as? UITouch
let location = touch.locationInNode(symbolsLayer)
e questo ha avuto precedentemente compilato bene in Xcode 6.2, ma con un aggiornamento 6.3, la linea "let touch = touches.anyObject! come? UITouch "sta gettando l'errore:
'Set' non ha un membro denominato 'ANYOBJECT'
Ho letto attraverso molte domanda simile, ma non riesco ad avvolgere la mia testa intorno" Per usare il valore, è necessario “scartare” per primo." Soprattutto perché le risposte sembrano concentrarsi sulle notifiche.
Grazie mille. W
duplicati di http://stackoverflow.com/questions/28771896/overriding-method-with-selector-touchesbeganwithevent -has-incompatible-type? –
Grazie Martin R. L'ho provato, ma sembra non essere esattamente il problema, cambiando ciò che hai suggerito "override func touchesBegan (tocca: Set, withEvent event: UIEvent) { if let touch = touches.first come? UITouch {"restituisce l'errore 'Set non ha un membro chiamato' first '. Ecco perché è apparso che ha qualcosa a che fare con la classificazione come array? –
Willie
Strano, il codice viene compilato nel mio progetto Xcode 6.3 –