Latest 0.1.2
Homepage https://github.com/storm52/LWXDetailController
License MIT
Platforms ios 8.0
Dependencies ReactiveObjC, YPTabBarController, Masonry
Authors

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.

Latest podspec

{
    "name": "LWXDetailController",
    "version": "0.1.2",
    "summary": "u5febu901fu8bbeu7f6eu4e00u4e2au6709u5934u89c6u56feu6709u81eau5b9au4e49u7684u5b50u63a7u5236u5668u7684u8be6u60c5u9875",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/storm52/LWXDetailController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "storm52": "[email protected]"
    },
    "source": {
        "git": "https://github.com/storm52/LWXDetailController.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "dependencies": {
        "ReactiveObjC": [
            "~> 2.1.0"
        ],
        "YPTabBarController": [],
        "Masonry": []
    },
    "source_files": "LWXDetailController/Classes/**/*"
}

Pin It on Pinterest

Share This