Git Product home page Git Product logo

lwxdetailcontroller's Introduction

LWXDetailController

CI Status Version License Platform

image

使用

继承LWXDetailController,重写headerView,指定子控制器数组,Done~

内容控制器可滑动,实现PageScrollDelegate,返回滑动的视图

- (UIScrollView *)scrollView{
    return self.tableView;
}

指定头部视图

- (UIView *)headerView {
    UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 100)];
    header.backgroundColor = UIColor.redColor;
    return header;
}

- (CustomHeaderView *)headerView{
    if (!_titleHeaderView) {
        _titleHeaderView = CustomHeaderView.new;
        _titleHeaderView.titleLabel.text = @"-----";
        _titleHeaderView.subTitleLabel.text = @"----";
    }
    return _titleHeaderView;
}


实现

用ReactiveObjC实现,监听切换事件,并对新的UIScrollView 的offset进行监听,与本身scrollview的offset协调。如果子控制器不是可滑动的,则切换到监听本身的offset即可

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

LWXDetailController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'LWXDetailController'

Author

storm52, [email protected]

License

LWXDetailController is available under the MIT license. See the LICENSE file for more info.

lwxdetailcontroller's People

Contributors

storm52 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lwxdetailcontroller's Issues

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.