Closed vgkanis closed 1 year ago
Hey @vgkanis, sorry for the late response.
That's weird, it's going to be difficult to troubleshoot without having access to the code. Would you be able to provide a sample project showcasing the issue or a few code excerpts?
same with me this is my code
func coachMarksController(_ coachMarksController: CoachMarksController, coachMarkAt index: Int) -> CoachMark {
var coachMark: CoachMark
let flatCutoutPathMaker = { (frame: CGRect) -> UIBezierPath in
return UIBezierPath(rect: frame)
}
let coachMarkPointOfInterest = homeCoachMarkViewModel.coachMarkData[index].pointOfInterest
coachMark = coachMarksController.helper.makeCoachMark(
for: coachMarkPointOfInterest,
pointOfInterest: coachMarkPointOfInterest.center,
cutoutPathMaker: flatCutoutPathMaker
)
coachMark.arrowOrientation = .top
coachMark.gapBetweenCoachMarkAndCutoutPath = 10.0
return coachMark
}
i found the problem
func coachMarksController(_ coachMarksController: CoachMarksController, coachMarkViewsAt index: Int, madeFrom coachMark: CoachMark) -> (bodyView: (UIView & CoachMarkBodyView), arrowView: (UIView & CoachMarkArrowView)?) {
let coachMarkBodyView = CoachMarkCustomBodyView()
var coachMarkArrowView: CoachMarkArrowDefaultView?
let coachMarkData = homeCoachMarkViewModel.coachMarkData[index]
coachMarkBodyView.configureBodyView(coachMarkData: coachMarkData)
coachMarkBodyView.frame = CGRect(x: 10, y: 10, width: self.view.frame.width * 0.8, height: 132)
if let arrowOrientation = coachMark.arrowOrientation {
let view = CoachMarkArrowDefaultView(orientation: arrowOrientation)
print("masuk arrow")
coachMarkArrowView = view
}
return (bodyView: coachMarkBodyView, arrowView: coachMarkArrowView)
}
i have to set y to 10 and arrow will appear
Awesome! Closing because a solution was found.
As the title says, the top arrow is not displayed. But, the bottom it is. The body of the CoachMark is a custom one, but I am using the default arrows. This screenshot is with the bottom arrow:
and this one is with the top arrow:
If I use my arrow, then I get the following screenshot
Does anybody know how to fix this?
Thank you