在iPhone 6s上获取屏幕特定部分的力量

时间:2015-10-27 13:51:38

标签: ios swift 3dtouch

是否可以在iPhone 6s上将力施加到iOS 9上的部分屏幕?

可以访问force实例的UITouch属性。还有其他方法吗?

1 个答案:

答案 0 :(得分:0)

查看UITouch

// Force of the touch, where 1.0 represents the force of an average touch
@available(iOS 9.0, *)
public var force: CGFloat { get }
// Maximum possible force with this input mechanism
@available(iOS 9.0, *)
public var maximumPossibleForce: CGFloat { get }