Skip to content

仿猫眼选座包含情侣座、落单判断等功能

License

Notifications You must be signed in to change notification settings

z624821876/YSSeatsPicker

Repository files navigation

YSSeatsPicker

CI Status Version License Platform

前言:

高仿猫眼选票模块,因为公司业务需求,要对接猫眼电影,网上也没有很完整的库,所以就结合了网上已有的几个库封装一个符合公司要求的库。

在基础的选座功能上实现了情侣座的选择和是否落单的判断

Example

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

Demo中的数据为真实猫眼电影座位数据

创建SeatsView:

#import "YSSeatsPickerHeader.h"

YSSeatsPicker *picker = [YSSeatsPicker new];
picker.frame = CGRectMake(0, 100, [UIScreen mainScreen].bounds.size.width, 500);
picker.seats = section.seats;
[self.view addSubview:picker];

展示数据:

[picker reloadData];

更新Frame后需要刷新:

[picker updateSeatsView];

校验是否落单:

[YSMovieTools checkSeatsWhetherAloneWithSelectsSeats:picker.selectSeats forSeats:picker.seats];

Requirements

Installation

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

pod 'YSSeatsPicker'

Author

yu, yu624821876@163.com

License

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

About

仿猫眼选座包含情侣座、落单判断等功能

Resources

License

Stars

Watchers

Forks

Packages

No packages published