https://github.com/storm52/lwxdetailcontroller
UIScrollVIew里嵌套多个子控制器联动上下滑动。tabbar调节参考https://github.com/yuping1989/YPTabBarController
https://github.com/storm52/lwxdetailcontroller
childcontroller page pageview reactivecocoa tabbar tesla uiscrollview
Last synced: 8 months ago
JSON representation
UIScrollVIew里嵌套多个子控制器联动上下滑动。tabbar调节参考https://github.com/yuping1989/YPTabBarController
- Host: GitHub
- URL: https://github.com/storm52/lwxdetailcontroller
- Owner: storm52
- License: mit
- Created: 2018-03-23T09:12:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T01:38:04.000Z (about 8 years ago)
- Last Synced: 2025-10-23T10:43:45.044Z (8 months ago)
- Topics: childcontroller, page, pageview, reactivecocoa, tabbar, tesla, uiscrollview
- Language: Objective-C
- Homepage:
- Size: 3.96 MB
- Stars: 32
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LWXDetailController
[](https://travis-ci.org/storm52/LWXDetailController)
[](http://cocoapods.org/pods/LWXDetailController)
[](http://cocoapods.org/pods/LWXDetailController)
[](http://cocoapods.org/pods/LWXDetailController)

## 使用
继承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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'LWXDetailController'
```
## Author
storm52, storm52@qq.com
## License
LWXDetailController is available under the MIT license. See the LICENSE file for more info.