a unit of property (iOS) called majorRadius in UITouch

Asked 2 years ago, Updated 2 years ago, 66 views

I have a question about Swift, Objective-C.
What is the unit of UITouch's majorRadius property?
It seems to return the area of the touch (the major diameter of the ellipse), but
I wonder if it is a unit such as px.

swift ios objective-c

2022-09-30 19:24

1 Answers

The document clearly says this.

majorRadius

The radius (in points) of the touch.

If you are programming iOS, you may know the unit of point, but the unit of point is the radius (major radius means half of the major diameter in Japanese).

However, as a characteristic of the touch sensor, it will be difficult to measure the actual contact area accurately, so it is better to consider the standard rather than the exact value.In fact, if you draw a circle of the radius of the number of points, it can be quite small.


2022-09-30 19:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.