Post

Replies

Boosts

Views

Activity

Reply to SFSafariViewController as childViewController overlapping view problem
//// ViewController.swift// TestSafariVC//// Created by Amit Dhadse on 14/02/20.// Copyright © 2020 Amit Dhadse. All rights reserved.//import UIKitimport SafariServicesclass ViewController: UIViewController { var safariVC = SFSafariViewController(url: URL(string: "https://apple.com")!) override func viewDidLoad() { super.viewDidLoad() addViewControllerAsChildViewController() } //firstVCIdentifier func addViewControllerAsChildViewController() { addChild(safariVC) self.view.addSubview(safariVC.view) safariVC.didMove(toParent: self) self.setUpConstraints() } func setUpConstraints() { self.safariVC.view.translatesAutoresizingMaskIntoConstraints = false self.safariVC.view.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor, constant: 30).isActive = true self.safariVC.view.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor, constant: -30).isActive = true self.safariVC.view.leadingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.leadingAnchor, constant: 30).isActive = true self.safariVC.view.trailingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.trailingAnchor, constant: -30).isActive = true }}Hey KaBlaize...Sorry man not understand your problem in deapth..may this small help will trigger something for you..Here what I did is..simple add SafariViewController as childview and set contraints to safariviewcontroller.Hope it will help..Thanks,Amit
Feb ’20