Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
var p = touches.anyObject().locationInview(self)
}
很多老教材都是这个方法来获取,touches.anyObject(), 可是最新的版本提示touches根本没有anyObject()这个方法了,怎么办呢?
|
1 |
let p = (touches as NSSet).anyObject()?.locationInview(self) |
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/164166.html原文链接:https://javaforall.net
