Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //
  2. // RoundedMap.swift
  3. //
  4. // Created by Lachy Schumacher.
  5. // Copyright © 2019 Lachy Schumacher. All rights reserved.
  6. //
  7. import UIKit
  8. import MapKit
  9.  
  10. @IBDesignable
  11. class RoundedMap: MKMapView{
  12. override init(frame: CGRect) {
  13. super.init(frame: frame)
  14. }
  15.  
  16. required init?(coder aDecoder: NSCoder) {
  17. super.init(coder: aDecoder)
  18. }
  19.  
  20. override func layoutSubviews() {
  21. super.layoutSubviews()
  22. self.layer.cornerRadius = frame.size.width / 2;
  23. self.clipsToBounds = true
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement