赞
踩
#import <JXCategoryView.h> #pragma mark ------- JXCategoryListContentViewDelegate ------- - (UIView *)listView { return self.view; } @property (nonatomic, strong) JXCategoryTitleView *jk_categoryView; // 分页 @property (nonatomic, strong) JXCategoryIndicatorLineView *indicator; @property (nonatomic, strong) JXCategoryListContainerView *jk_listContainerView; @property (nonatomic, strong) JXCategoryIndicatorBackgroundView *backgroundView; // 背景 - (JXCategoryTitleView *)jk_categoryView { if (!_jk_categoryView) { _jk_categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; _jk_categoryView.titles = @[@"直播", @"关注", @"视频", @"附近"]; _jk_categoryView.averageCellSpacingEnabled = NO; _jk_categoryView.titleLabelVerticalOffset = kAdaptedFloat(5); _jk_categoryView.cellSpacing = kAdaptedFloat(35); _jk_categoryView.cellWidth = kAdaptedFloat(20); _jk_categoryView.titleColor = k_Color_TipColor; _jk_categoryView.titleSelectedColor = [UIColor blackColor]; _jk_categoryView.titleFont = kAdaptedFontSize(16); _jk_categoryView.titleSelectedFont = kAdaptedFontSize(22); _jk_categoryView.contentEdgeInsetLeft = kAdaptedFloat(25); _jk_categoryView.indicators = @[self.indicator]; } return _jk_categoryView; } - (JXCategoryIndicatorLineView *)indicator { if (!_indicator) { _indicator = [[JXCategoryIndicatorLineView alloc] init]; _indicator.indicatorColor = k_Color_themeColor; _indicator.indicatorWidth = kAdaptedFloat(21); _indicator.verticalMargin = kAdaptedFloat(5); } return _indicator; } - (JXCategoryListContainerView *)jk_listContainerView { if (!_jk_listContainerView) { _jk_listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self]; self.jk_categoryView.listContainer = _jk_listContainerView; } return _jk_listContainerView; } - (JXCategoryIndicatorBackgroundView *)backgroundView { if (!_backgroundView) { _backgroundView = [[JXCategoryIndicatorBackgroundView alloc] init]; _backgroundView.indicatorColor = [UIColor clearColor]; _backgroundView.indicatorHeight = kAdaptedFloat(24); _backgroundView.indicatorCornerRadius = kAdaptedFloat(24) / 2; _backgroundView.borderColor = [UIColor blackColor]; _backgroundView.borderWidth = 1; } return _backgroundView; } #pragma mark ------- JXCategoryListContainerViewDelegate ------- //返回列表的数量 - (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView { return self.jk_categoryView.titles.count; } //根据下标index返回对应遵从`JXCategoryListContentViewDelegate`协议的列表实例 - (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { switch (index) { case 0: { QXLiveViewController *vc = [[QXLiveViewController alloc] init]; vc.interFace = Home_GetHot; return vc; } break; default: { QXLiveViewController *vc = [[QXLiveViewController alloc] init]; vc.interFace = Home_GetNearby; return vc; } break; } }
[OCProgress_HUD setMaxSupportedWindowLevel:UIWindowLevelAlert];
[OCProgress_HUD setMinimumDismissTimeInterval:1.5];
[OCProgress_HUD setDarkStyle];
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。