-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem to present in Navigation Controller #2
Comments
Have you tried placing the |
Hi, im tried to present in topViewController and app dont crash anymore, awesome! But im want to present coachmark in my NavigationBar too, like coachmarking my barbutton items... Check this image on attach My code:
Thanks bro |
Got it, here:
you are adding the coach mark as a subview of And here:
you are installing layout constraints between the coach mark and your view controller To fix your issue just set the constraints between
|
Ohh, its works very well!! Thank you!! One more question here, I swear =D Why are some white corners appearing? I already tried to change the background color and other things, but nothing stopped them from appearing. If I use in my navigationController.topView these same white corners do not appear! Doesnt matter the position, look this |
This is probably because the Try adding some margin to it, try something like this:
|
Doesnt matter my insetBy, the white walkers (AKA white corners) continues appearing |
Can you upload an example project having this issue? |
Yes, take a look https://github.com/fabriciomasiero/CoachMarksExampleError Please, use iPhone 6s, cause the present CGRect are with hand values |
Ok, I guess that's a bug. I'll push a fix as soon as possible. |
Let me know if 56fce70 fixes the issue |
@pNre WORKS!!! Thanks bro! |
Hi, im attempting to present the CoachMark in NavigationController!
And i write this:
self.navigationController?.view.addSubview(coachmark)
coachmark.translatesAutoresizingMaskIntoConstraints = false
coachmark.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
coachmark.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
coachmark.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
coachmark.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
But the console show me this error: *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to activate constraint with anchors <NSLayoutXAxisAnchor:0x60800126f880 "CoachMarks.CoachmarkView:0x7fe78bee92f0.left"> and <NSLayoutXAxisAnchor:0x60800126f900 "UIView:0x7fe78bee8df0.left"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal.'
Whats going on? Thanks
The text was updated successfully, but these errors were encountered: