I have provided below code where is face crash in containerView function of initViews() and below is how i use in viewDidLoad() and viewWillAppear i also tried setting up in viewdidAppear but still facing the crash. Please help me with a solution as i have already implemented in client project.
func initViews() {
let center = calculateCenter(at: targetView, to: containerView)
addTargetRipple(at: center)
addTargetHolder(at: center)
// if color is not UIColor.clear, then add the target snapshot
if targetHolderColor != .clear {
addTarget(at: center)
}
addBackground()
addInstructionView(at: center)
instructionView.layoutIfNeeded()
// Disable subview interaction to let users click to general view only
subviews.forEach({$0.isUserInteractionEnabled = false})
if isTapRecognizerForTargetView {
//Add gesture recognizer for targetCopyView
hiddenTargetHolderView.addGestureRecognizer(tapGestureRecoganizer())
hiddenTargetHolderView.isUserInteractionEnabled = true
} else {
// Add gesture recognizer for both container and its subview
addGestureRecognizer(tapGestureRecoganizer())
hiddenTargetHolderView.addGestureRecognizer(tapGestureRecoganizer())
hiddenTargetHolderView.isUserInteractionEnabled = true
}
I have provided below code where is face crash in containerView function of initViews() and below is how i use in viewDidLoad() and viewWillAppear i also tried setting up in viewdidAppear but still facing the crash. Please help me with a solution as i have already implemented in client project.
let showcase = MaterialShowcase()
self.showcase.setTargetView(button: self.btnLogin)
override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.showcase.show { print("Success") } }
func initViews() { let center = calculateCenter(at: targetView, to: containerView)
}