Giter Site home page Giter Site logo

superevilrabbit / eafeatureguideview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from easence/eafeatureguideview

0.0 0.0 0.0 68 KB

An easy way to show feature guide with EAFeatureGuideView for iOS.

License: MIT License

Objective-C 85.89% Ruby 14.11%

eafeatureguideview's Introduction

EAFeatureGuideView

============

EAFeatureGuideView能做什么

EAFeatureGuideView是UIView的一个扩展,用来做新功能引导提示,达到这样的效果:

  • 局部区域高亮(可以设置圆角)
  • 有箭头指向高亮区域
  • 可以设置一段介绍文字(可以是图片、也可以是文字)
  • 可以对应一个按钮,可以通过配置事件、标题。

最后的效果如下: 效果图1 效果图2

如何使用

如果安装了Cocoapods,可以在Podfile中加入如下代码:

pod 'EAFeatureGuideView' ,接着 pod install

接着在需要展示提示的页面引入头文件:

#import "UIView+EAFeatureGuideView.h"

最后添加如下代码:

EAFeatureItem *item = [[EAFeatureItem alloc] initWithFocusView:self.exampleCell focusCornerRadius:0 focusInsets:UIEdgeInsetsZero];
item.introduce = @"txt_feature_post_activity_4.1.png";
item.actionTitle = @"太好了";
item.action = ^(id sender){
        NSLog(@"touched ..");  
    };

EAFeatureItem *recents = [[EAFeatureItem alloc] initWithFocusRect:CGRectMake(centerX - 25, centerY - 25, 50, 50) focusCornerRadius:25 focusInsets:UIEdgeInsetsZero];    
recents.introduce = @"recents";

[self.navigationController.view showWithFeatureItems:@[item, recents] saveKeyName:@"keyName" inVersion:nil];

可以优化的地方

  • 介绍文案没有支持多颜色。
  • 当高亮区域是圆形的时候,箭头的指向没有对中圆心。
  • 旋转屏幕的时候,EAFeatureItem是一个rect的时候,不能自动的重新布局。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.