Skip to content

Conversation

@SuperTango
Copy link

I really like WSCoachMarksView, but found with all of the different iOS screen sizes and more UIs relying on autolayout, specifying the rect statically in the config was too cumbersome for the different devices (i have a branch that lets you specify different rects for different devices that I'll submit for a pull request shortly, but what a PITA that is for most elements that we were using.)

So, i created this fork/branch that adds the ability specify a tag number to get the rect as well as some ancillary ways to crop the cutout rect if you only want part of a particular UI element shown (the padding, which has a default of 10, and then you can set it on a per rect basis as a whole ("padding"), or each of the "paddingLeft", "paddingTop", "paddingRight", and "paddingBottom".

Also, if you specify the tag as an array, it will use the array to find the UI element nested within the view hierarchy. This includes static nested elements, as well as UITableViews and UICollectionViews.

This pull request has a demo program as well. Please let me know if you have any questions.

Thanks.

Example screens of the same element specified using a tag with a -65% paddingBottom on an iPhone6 and iPhone 4s.

ios simulator screen shot jan 11 2015 11 17 43 pm
ios simulator screen shot jan 11 2015 11 19 34 pm

The tag is specified in the coachMarks array, and the padding is
currently a global setting.
Also added ability to specify percentage as well.
by specifying an array of tag numbers.  This is useful for showing
coachmarks on UITableView and UICollectionViews.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant