-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only require popup bar layout fixes only when a SwiftUI view is used …
…as popup content Demo project improvements
- Loading branch information
Showing
6 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
LNPopupUIExample/LNPopupUIExample/IntroWebView/WebController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// WebController.swift | ||
// LNPopupUIExample | ||
// | ||
// Created by Leo Natan on 10/14/20. | ||
// | ||
|
||
import UIKit | ||
import WebKit | ||
|
||
class WebController: UIViewController { | ||
private let webView = WKWebView() | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
webView.load(URLRequest(url: URL(string: "https://github.com/LeoNatan/LNPopupUI")!)) | ||
webView.translatesAutoresizingMaskIntoConstraints = false | ||
|
||
view.addSubview(webView) | ||
NSLayoutConstraint.activate([ | ||
view.topAnchor.constraint(equalTo: webView.topAnchor), | ||
view.bottomAnchor.constraint(equalTo: webView.bottomAnchor), | ||
view.leadingAnchor.constraint(equalTo: webView.leadingAnchor), | ||
view.trailingAnchor.constraint(equalTo: webView.trailingAnchor), | ||
]) | ||
|
||
popupItem.title = "Welcome to LNPopupUI" | ||
popupItem.image = UIImage(named: "genre10") | ||
popupItem.barButtonItems = [ | ||
UIBarButtonItem(image: UIImage(systemName: "suit.heart.fill"), style: .done, target: nil, action: nil) | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters