You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know my solution is already late for you but I am pretty sure it is helpful for others!
The way that you change the background color of the FPVWidget is as follows:
// Define FPV Widget instance
let fpvWidget = DUXBetaFPVWidget()
// Access its view
let fpvWidgetView = fpvWidget.view
// Adding its view to current ViewController views (Important Step)
view.addSubview(fpvWidgetView!)
// Access all subviews inside the fpvWidgetView
fpvWidgetView!.subviews.forEach { v in
if v.duxbeta_className() == "UIView" { // This is exactly the view that we are changing its color to green
v.backgroundColor = .green
}
print(v.duxbeta_className()) // See all other subviews types
//[UIView, UXSDKCore.DUXBetaFPVGridView, UXSDKCore.DUXBetaFPVCenterView, UIStackView] will be printed out!
}
// stretch the fpvWidget to the whole screen
fpvWidgetView!.translatesAutoresizingMaskIntoConstraints = true
fpvWidget.install(in: self)
I want to change fpvWidget.fpvView.backgroundColor,
but the fpvView is fileprivate.
How can I change the fpvView.backgroundColor?
The text was updated successfully, but these errors were encountered: