bubudrc / MPCoachMarks

MPCoachMarks is an iOS class that displays user coach marks with a couple of shapescutout over an existing UI. This approach leverages your actual UI as part of the onboarding process for your user.
MIT License
629 stars 79 forks source link

Does this support both landscape & portrait mode ?? #24

Open siddharthsuneel opened 7 years ago

siddharthsuneel commented 7 years ago

I have implemented this pod in my project, but whenever the orientation changes overlay mask does not get adjusted automatically.

billburgess commented 7 years ago

I had this problem as well. Here are the steps I use to get around the problem.

  1. Keep a reference to your object. You can detect rotation and if this is showing, perform the following steps.
  2. Call [coachMarks end] before rotation. I do this in the -viewWillTransitionToSize.
  3. Once rotation is complete, put the coachMarks back into place.

I monitor which items have been seen and remove them so that if you rotate and put them back in place, I don't re-add any items that may have already been shown. Hopefully this will get you close.