Ora che CGRectMake, CGPointMake, CGSizeMake, ecc. È stato rimosso in Swift 3.0, c'è un modo per aggiornare automaticamente tutte le inizializzazioni come da CGRectMake(0,0,w,h) to CGRect(x:0,y:0,width:w,height:h)
. Il processo manuale è .. piuttosto un dolore.Aggiorna CGRectMake a CGRect in Swift 3 Automaticamente
Non so perché Apple non automatica convertire questo quando ho convertire il codice a Swift Current Sintassi ...
Converti in corrente La sintassi Swift funziona per me e converte 'CGRectMake (0,0, w, h)' in 'CGRect (x: 0, y: 0, larghezza: w, altezza: h)'. Se non funziona nel tuo caso, dovresti presentare una segnalazione di bug. –