Giter Club home page Giter Club logo

fmhoverscrollkit's Introduction

FMHoverScrollKit

这是一个控件悬停的UI效果实现,类似于网易云课堂的详情页UI效果

1.工程引入FMBaseViewController, 并添加要自定义的controller

  • 有关头部image及button的相关设置通过,FMBaseViewController的属性进行设置,示例代码如下:
FMBaseViewController *bvc = [[FMBaseViewController alloc] init];
bvc.btnBackColor = [UIColor cyanColor];
bvc.btnTitleArr = @[@"张三", @"李四", @"王五"];
bvc.indicatorColor = [UIColor yellowColor];
bvc.isIndicatorHidden = YES;
bvc.headImage_H = 100;
bvc.button_H = 30;
bvc.headImageName = @"picture_3";
bvc.isStretch = NO;

2.注意:自定义的controller 必须继承于FMParentViewController.h, 并且子控制器暂时只支持UITableViewController

  • 子控制器类型1 :FMTableViewStylePlain 初始化代码如下:
FMT2ViewController *t2 = [[FMT2ViewController alloc] initWithTableViewStyle:FMTableViewStylePlain];
或者(default)
FMT1ViewController *t1 = [[FMT1ViewController alloc] init];
  • 子控制器类型2:FMTableViewStyleGroup 初始化代码如下:
FMT2ViewController *t2 = [[FMT2ViewController alloc] initWithTableViewStyle:FMTableViewStyleGrouped];
或者(用属性修改)
FMT1ViewController *t2 = [[FMT1ViewController alloc] init];
t2.tableViewStyle = FMTableViewStyleGrouped;

3.头部视图是否可以拉伸:

isStretch 属性(default is YES)
  • 测试效果查看,在AppDelegate.m 的launch函数中添加(或替换)如下代码:
FMBaseViewController *bvc = [[FMBaseViewController alloc] init];
    self.window.rootViewController = bvc;
    [self.window makeKeyAndVisible];
  • 自定义子controller初始化后传入该数组childVCArr,示例代码如下:
    FMBaseViewController *bvc = [[FMBaseViewController alloc] init];
    FMT1ViewController *t1 = [[FMT1ViewController alloc] init];
    FMT2ViewController *t2 = [[FMT2ViewController alloc] initWithTableViewStyle:FMTableViewStyleGrouped];
    FMT3ViewController *t3= [[FMT3ViewController alloc] init];
    bvc.childVCArr = @[t1, t2, t3];

####子控制器最好不要超过5个, 暂不支持滑动(以后可能添加,敬请期待!)

  • headView上的内容可自定义添加,通过 ftc.headView可拿到head部分的视图添加自己的控件。
  • 支持cocoaPods 安装
pod search FMHoverScrollKit
在Podfile中添加
pod "FMHoverScrollKit"
pod install || pod update

##功能尚不完善, 持续更新中,敬请期待!

fmhoverscrollkit's People

Contributors

oszhou avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.