Original intention
Recent project new function changes larger, product children's shoes requirements to join the new function guide, so a breath spent two days to do a guide page, of course, plus the back of tinkering time, more than two days, but this thing is a matter of once and for all, is worth doing. At the same time, in order to be able to better reuse, I made it into a pod library, the project address here: Eafeatureguideview.
What Eafeatureguideview can do?
Eafeatureguideview is an extension of UIView, which is used to guide hints of new features to achieve this effect:
- Local area highlighting (you can set rounded corners)
- There are arrows pointing to the highlighted area
- You can set an introductory text (can be a picture, or it can be text)
- You can correspond to a button by configuring the event, title.
The final effect is as follows:
Effect Figure 1
Effect Figure 2
How to use
If Cocoapods is installed, you can add the following code to the Podfile:
Pod ' Eafeatureguideview ', then pod install.
Then introduce the header file in the page where you want to show the hint:
#import "Uiview+eafeatureguideview.h"
Finally add the following code:
Eafeatureitem *item = [[Eafeatureitem alloc] InitWithFocusView:self.exampleCell focuscornerradius:0 focusinsets: Uiedgeinsetszero];
Item.introduce = @ "Txt_feature_post_activity_4.1.png";
Item.actiontitle = @ "Too good";
Item.action = ^ (id sender) {
NSLog (@ "touched..");
Eafeatureitem *recents = [[Eafeatureitem alloc] Initwithfocusrect:cgrectmake (centerX-25, centerY-25, m) focuscorn Erradius:25 Focusinsets:uiedgeinsetszero];
Recents.introduce = @ "Recents";
[Self.navigationController.view Showwithfeatureitems:@[item, recents] savekeyname:@ "KeyName" inversion:nil];
Can optimize the place
The introduction copy does not support multiple colors.
When the highlighted area is rounded, the arrow points to the center of the Centre.
Original link: http://www.jianshu.com/p/c9a44edc9fbf
The above is the IOS Implementation Guide page's Hollow effect example, has the need the reference, thanks everybody to this station support!