-
-
Notifications
You must be signed in to change notification settings - Fork 240
Open
Description
I have searched in existing issues but could not find any solution.
I have situations where i need to create multiple webview which i'm handling through tabman. problem is it is taking too much time to load and app kind of stuck for some seconds.
Implementation is really straightforward and according to docs.
class TabViewController: TabmanViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.dataSource = self
let bar = TMBarView<TMConstrainedHorizontalBarLayout, TMTabItemBarButton, TMLineBarIndicator>()
bar.buttons.customize {
$0.tintColor = Asset.lightBlue.color
$0.selectedTintColor = Asset.darkSkyBlue.color
$0.font = FontFamily.MyriadPro.bold.font(size: 14)
$0.adjustsFontForContentSizeCategory = true
}
bar.spacing = 16
bar.fadesContentEdges = false
bar.layout.transitionStyle = .snap // Customize
let systembar = bar.systemBar()
systembar.backgroundStyle = .flat(color: UIColor.white)
self.addBar(systembar,
dataSource: self,
at: .top)
self.loadSelectedWebsites()
}
func loadData() {
for selectedWebsite in self.selectedWebsites {
let webController = StoryboardScene.Main.webViewController.instantiate()
webController.delegate = self
webController.websiteURL = selectedWebsite.url
self.viewControllers.append(webController)
}
self.reloadData()
}
}
and class conforms to datasource delegates of Tabman
Metadata
Metadata
Assignees
Labels
No labels