How can I get the bottom left coordinate, i.e. the maximum y coordinate, of a view in obj-c and Swift?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
It depends on what you want the coordinate in reference to. If you want the bottom left coordinate in your view's superview you could get the left and bottom with:
view.frame.origin.x
for the left coordinateand
view.frame.origin.y + view.frame.size.height
for the bottom coordinateSupposing that you're talking about
UIView
, you may want to look at theCGGeometry
reference.Talking about 'left' and y coordinate doesn't make much sense, but for instance
and so on. You get the idea.
In Swift, this is even more convenient, as you can do