• iOS 引导页组件 HcdGuideView


    HcdGuideView

    HcdGuideView让你为你的app添加一个漂亮的启动页变得简单。

    要求

    • Xcode 6 or higher

    • iOS 7.0 or higher

    • ARC

    安装方法

    手动安装

    所有你需要做的就是将HcdGuideView文件加下的所有文件导入到你自己的项目中去,然后在你需要使用的地方导入#include "HcdGuideView.h"就可以了。

    Cocoapods

    我推荐的一个安装HcdGuideView的方法是通过CocoaPods管理包工具来安装,因为它能自动配置到你的项目工程中来。首先最好将CocoaPods更新到最新版本的,你可以通过Homebrew来安装CocoaPods。悦德财富:https://www.yuedecaifu.com/front/invest/investHome

    如果你还没有安装Cocoapods的话你可以按照《CocoaPods安装和使用教程》 这篇文章来进行安装。

    安装好CocosPods后,打开终端切换到你的工程所在目录:

     
    1
    2
    3
    cd /path/to/YourProject
    touch Podfile
    $ edit Podfile

    然后编辑Podfile文件并且添加HcdGuideView:

     
    1
    pod 'HcdGuideView'

    安装到你的工程中:

     
    1
    $ pod install

    然后打开目录下的*.xcworkspace文件

     
    1
    open YourProject.xcworkspace

    这样就集成成功了,如果出现错误,可能是Cocoapods版本太低,请更新到最新版本。如果是找不到HcdGuideView,请重新pod setup 一次,然后再 pod search HcdGuideView 看看。

    示例

     
    1
    2
    3
    4
    5
    NSMutableArray *images = [NSMutableArray new];
    [images addObject:[UIImage imageNamed:@"1"]];
    [images addObject:[UIImage imageNamed:@"2"]];
    [images addObject:[UIImage imageNamed:@"3"]];
    [[HcdGuideViewManager sharedInstance] showGuideViewWithImages:images andButtonTitle:@"立即体验" andButtonTitleColor:[UIColor whiteColor] andButtonBGColor:[UIColor clearColor] andButtonBorderColor:[UIColor whiteColor]];

    你可以将上面代码放到你想要显示的引导页的地方,一般都放在AppDelegate中。

  • 相关阅读:
    centos7 部署kubernetes 1.20.1
    Pulse Width Modulation (PWM) interface
    imx6的IOMUX配置方法
    Linux下巧用转义符来完成多阶攻击
    记录一次半失败的php代码审计
    通过钉钉网页上的js学习xss打cookie
    PostMessage xss学习和挖掘
    解决Android微信支付官方demo运行失败
    Android集成银联支付,提示java.lang.UnsatisfieldLinkError错误
    解决 Plugin with id 'com.github.dcendents.android-maven' not found.
  • 原文地址:https://www.cnblogs.com/oceansea/p/5942874.html
Copyright © 2020-2023  润新知