-
Notifications
You must be signed in to change notification settings - Fork 491
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
CoachMark misplaced on iPad #160
Comments
@ephread , any information on this issue? Is there something more that I can do to help you trace the issue and fix it? |
Hey @o15a3d4l11s2, thanks a lot for providing a sample, that's really helpful! Sorry about that. The issue is that the layout engine is a bit dumb. It doesn't center the coach mark body around the arrow (more on that later). Rather, depending on the horizontal position of the Instructions was originally designed for the iPhone and I obviously never bother to test for all possible case on the iPad (nor did I even think of all these cases). Early on, I didn't want to pre-compute the width of the content and laying out in two passes, but I now believe that it wasn't that much of a good decision. To be honest, there are a number of tiny issues in the layout engine that have been bugging me for a while. So, I'm going to rewrite the engine, but I can't really give you a time window as to when it's going to be available. |
A proposal - I know it is not optimal, but what about adding a "fake" view with size 1x1, which is added on the This way you can set constraints related to this "fake" element and centre the coachMark on it. Adding horizontal constraints to the superview will ensure that the coachMark will not go outside the container and therefore, the screen. An example of my proposal:
|
That's an option, but I believe it'll break for points of interest that are very close to the edge of the screen. Unless you have really short text (in the case of text-only coach marks), you won't able to center the content around the arrow without ending up with a very short width and insane word/character wrapping. And I'm not certain constraint priorities would help (I haven't tested them with the latest SDK, but I did a while ago). I've posted a very long comment related to this matter on #165 if you wish to contribute. |
@o15a3d4l11s2 the issue should be fixed in |
I checked both my real project and the demo project provided here and all works as expected. Thank you for the library and the invested time and efforts! |
@o15a3d4l11s2 Great, thanks for the kind words! |
@ephread , I could not find this included in a release. Could you please verify if it is released? |
Hi @ephread, Thanks |
@vivek4292, as I see the fix it not merged into any released version. I was hoping to get response from @ephread, who was very kind to do the fix and I tested it, but unfortunately it seems he is quite busy at the moment. Hope to get the issue resolved soon. |
Thanks, @o15a3d4l11s2 for letting me know. I Hope @ephread will respond us soon. |
The position of the shown CoachMark is incorrect for iPad (both portrait and landscape) is not correct. The arrow is shown at the centre, where it should be, but the dialog itself is dispositioned:
You can use the attached demo project for reproduction.
Demo.zip
The text was updated successfully, but these errors were encountered: