-
Notifications
You must be signed in to change notification settings - Fork 564
Closed
Milestone
Description
I currently use Macaw 0.9.3. and cant seem to get the contentMode working (MacawView and SVGView)
Neither via storyboard, nor via code. It kinda seems like I'm missing something.
import UIKit
import Macaw
class SVGViewController: UIViewController {
@IBOutlet weak var macaw: MacawView!
@IBOutlet weak var svgView: SVGView!
override func viewDidLoad() {
super.viewDidLoad()
let tiger = try! SVGParser.parse(resource: "tiger")
self.macaw.node = tiger
self.macaw.backgroundColor = .darkGray
self.macaw.contentMode = .scaleToFill
self.svgView.node = tiger
self.svgView.backgroundColor = .darkGray
self.svgView.contentMode = .scaleToFill
}
}
The tiger.svg is shown on both but seems to be using .scaleAspectFit (by default I guess).
Big Scope:
What I'm actually trying to archive is masking a UIView with and SVG file. but therefor I need the SVG to.scaleToFillthe other view (i.e.svgView.contentMode = .scaleToFill; svgView.frame = content.frame`; content.mask = svgView;)