8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

View四隅の座標の取得

Last updated at Posted at 2017-10-14

親Viewを基準としたViewのX,Y座標 (OSX)

NSImageViewのview、
@IBOutlet weak var view: NSImageView!
の上下左右端の座標を取得する。

X座標

・左端 view.frame.origin.x
・右端 view.frame.origin.x + view.frame.size.width

Y座標

・上端 view.frame.origin.y
・下端 view.frame.origin.y + view.frame.size.height

##そのた
参考:How get bottom y coordinate
実際にやってみるとy座標はウィンドウの下端が基準になっているようだが、iOSだと上端基準なのか?

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?