Commit 1980da07066ddc187fb230e7a897564071656bae
1 parent
8e97e9e9
ahhhh
Showing
8 changed files
with
100 additions
and
33 deletions
LiveVideoCloud.xcodeproj/xcuserdata/cnlive.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
| @@ -2,4 +2,54 @@ | @@ -2,4 +2,54 @@ | ||
| 2 | <Bucket | 2 | <Bucket |
| 3 | type = "1" | 3 | type = "1" |
| 4 | version = "2.0"> | 4 | version = "2.0"> |
| 5 | + <Breakpoints> | ||
| 6 | + <BreakpointProxy | ||
| 7 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 8 | + <BreakpointContent | ||
| 9 | + shouldBeEnabled = "No" | ||
| 10 | + ignoreCount = "0" | ||
| 11 | + continueAfterRunningActions = "No" | ||
| 12 | + filePath = "LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelPagingView.m" | ||
| 13 | + timestampString = "520154004.406962" | ||
| 14 | + startingColumnNumber = "9223372036854775807" | ||
| 15 | + endingColumnNumber = "9223372036854775807" | ||
| 16 | + startingLineNumber = "86" | ||
| 17 | + endingLineNumber = "86" | ||
| 18 | + landmarkName = "-requestAppindex" | ||
| 19 | + landmarkType = "7"> | ||
| 20 | + </BreakpointContent> | ||
| 21 | + </BreakpointProxy> | ||
| 22 | + <BreakpointProxy | ||
| 23 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 24 | + <BreakpointContent | ||
| 25 | + shouldBeEnabled = "Yes" | ||
| 26 | + ignoreCount = "0" | ||
| 27 | + continueAfterRunningActions = "No" | ||
| 28 | + filePath = "LiveVideoCloud/Classes/Sections/HomePageSections/JBBannerView.m" | ||
| 29 | + timestampString = "520155014.350986" | ||
| 30 | + startingColumnNumber = "9223372036854775807" | ||
| 31 | + endingColumnNumber = "9223372036854775807" | ||
| 32 | + startingLineNumber = "52" | ||
| 33 | + endingLineNumber = "52" | ||
| 34 | + landmarkName = "-setBannerArray:" | ||
| 35 | + landmarkType = "7"> | ||
| 36 | + </BreakpointContent> | ||
| 37 | + </BreakpointProxy> | ||
| 38 | + <BreakpointProxy | ||
| 39 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 40 | + <BreakpointContent | ||
| 41 | + shouldBeEnabled = "Yes" | ||
| 42 | + ignoreCount = "0" | ||
| 43 | + continueAfterRunningActions = "No" | ||
| 44 | + filePath = "LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelPagingView.m" | ||
| 45 | + timestampString = "520155233.787947" | ||
| 46 | + startingColumnNumber = "9223372036854775807" | ||
| 47 | + endingColumnNumber = "9223372036854775807" | ||
| 48 | + startingLineNumber = "109" | ||
| 49 | + endingLineNumber = "109" | ||
| 50 | + landmarkName = "-requestAppindex" | ||
| 51 | + landmarkType = "7"> | ||
| 52 | + </BreakpointContent> | ||
| 53 | + </BreakpointProxy> | ||
| 54 | + </Breakpoints> | ||
| 5 | </Bucket> | 55 | </Bucket> |
LiveVideoCloud/AppCustoms/Main/ZXTabBarController.m
| @@ -51,9 +51,9 @@ | @@ -51,9 +51,9 @@ | ||
| 51 | 51 | ||
| 52 | - (void)createUI | 52 | - (void)createUI |
| 53 | { | 53 | { |
| 54 | - [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCHomePageViewController alloc]init]] title:@"" image:@"home page" selectedImage:@"home page-click on"]; | ||
| 55 | - [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[HomeViewController alloc]init]] title:@"" image:@"live_default" selectedImage:@"live_focused"]; | ||
| 56 | - [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[UIViewController alloc]init]] title:@"" image:@"news_default" selectedImage:@"news_focused"]; | 54 | + [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[HomeViewController alloc]init]] title:@"" image:@"home page" selectedImage:@"home page-click on"]; |
| 55 | +// [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[HomeViewController alloc]init]] title:@"" image:@"live_default" selectedImage:@"live_focused"]; | ||
| 56 | +// [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[UIViewController alloc]init]] title:@"" image:@"news_default" selectedImage:@"news_focused"]; | ||
| 57 | [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCMineViewController alloc]init]] title:@"" image:@"my" selectedImage:@"my-click on"]; | 57 | [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCMineViewController alloc]init]] title:@"" image:@"my" selectedImage:@"my-click on"]; |
| 58 | } | 58 | } |
| 59 | 59 |
LiveVideoCloud/Classes/Sections/HomePageSections/JBBannerView.h
| @@ -24,5 +24,6 @@ | @@ -24,5 +24,6 @@ | ||
| 24 | 24 | ||
| 25 | @property (nonatomic, weak) id <JBBannerViewDelegate> delegate; | 25 | @property (nonatomic, weak) id <JBBannerViewDelegate> delegate; |
| 26 | @property (nonatomic, weak) id <JBBannerViewDatasource> datasource; | 26 | @property (nonatomic, weak) id <JBBannerViewDatasource> datasource; |
| 27 | +@property (nonatomic, strong) NSArray *bannerArray; | ||
| 27 | 28 | ||
| 28 | @end | 29 | @end |
LiveVideoCloud/Classes/Sections/HomePageSections/JBBannerView.m
| @@ -46,6 +46,15 @@ | @@ -46,6 +46,15 @@ | ||
| 46 | [_collectionView scrollToItemAtIndexPath:newIndexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:YES]; | 46 | [_collectionView scrollToItemAtIndexPath:newIndexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:YES]; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | +- (void)setBannerArray:(NSArray *)bannerArray { | ||
| 50 | + | ||
| 51 | + if (_bannerArray != bannerArray) { | ||
| 52 | + _bannerArray = bannerArray; | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + } | ||
| 56 | +} | ||
| 57 | + | ||
| 49 | #pragma mark - UICollectionViewDelegate !!!!!!!!!!!! | 58 | #pragma mark - UICollectionViewDelegate !!!!!!!!!!!! |
| 50 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { | 59 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { |
| 51 | 60 |
LiveVideoCloud/Classes/Sections/HomePageSections/JBSearchView.m
| @@ -31,35 +31,35 @@ | @@ -31,35 +31,35 @@ | ||
| 31 | 31 | ||
| 32 | if (_sortArray != sortArray) { | 32 | if (_sortArray != sortArray) { |
| 33 | _sortArray = sortArray; | 33 | _sortArray = sortArray; |
| 34 | - | ||
| 35 | - if ([Tools isArray:sortArray]) { | ||
| 36 | - | ||
| 37 | - [self addSubview:self.sortBtnBackground]; | ||
| 38 | - CGFloat width = 13; | ||
| 39 | - for (int i = 0; i < sortArray.count; i++) { | ||
| 40 | - NSDictionary *dic = [sortArray safetyObjectAtIndex:i]; | ||
| 41 | - NSString *name = dic[@"name"]; | ||
| 42 | - CGRect rect = [name boundingRectWithSize:CGSizeMake(0, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:15]} context:nil]; | ||
| 43 | - UIButton *sortBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 44 | - sortBtn.tag = 100+i; | ||
| 45 | - sortBtn.frame = CGRectMake(width, 0, rect.size.width, 33); | ||
| 46 | - sortBtn.titleLabel.font = [UIFont systemFontOfSize:14]; | ||
| 47 | - [sortBtn setTitle:name forState:UIControlStateNormal]; | ||
| 48 | - [sortBtn setTitleColor:[UIColor grayColorCNLive] forState:UIControlStateNormal]; | ||
| 49 | - [sortBtn addTarget:self action:@selector(sortBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 50 | - [self.sortBtnBackground addSubview:sortBtn]; | ||
| 51 | - width += rect.size.width + 13; | ||
| 52 | - } | ||
| 53 | - self.sortBtnBackground.width = width; | ||
| 54 | - self.sortBtnBackground.x = KScreenWidth-self.sortBtnBackground.width-10; | ||
| 55 | - self.searchBtn.width = KScreenWidth-20-7-self.sortBtnBackground.width; | ||
| 56 | - [self addSubview:self.sortBtnBackground]; | ||
| 57 | - | ||
| 58 | - } else { | 34 | + } |
| 59 | 35 | ||
| 60 | - self.searchBtn.width = KScreenWidth-20; | ||
| 61 | - [self.sortBtnBackground removeFromSuperview]; | 36 | + if ([Tools isArray:sortArray]) { |
| 37 | + | ||
| 38 | + [self addSubview:self.sortBtnBackground]; | ||
| 39 | + CGFloat width = 13; | ||
| 40 | + for (int i = 0; i < sortArray.count; i++) { | ||
| 41 | + NSDictionary *dic = [sortArray safetyObjectAtIndex:i]; | ||
| 42 | + NSString *name = dic[@"name"]; | ||
| 43 | + CGRect rect = [name boundingRectWithSize:CGSizeMake(0, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:15]} context:nil]; | ||
| 44 | + UIButton *sortBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 45 | + sortBtn.tag = 100+i; | ||
| 46 | + sortBtn.frame = CGRectMake(width, 0, rect.size.width, 33); | ||
| 47 | + sortBtn.titleLabel.font = [UIFont systemFontOfSize:14]; | ||
| 48 | + [sortBtn setTitle:name forState:UIControlStateNormal]; | ||
| 49 | + [sortBtn setTitleColor:[UIColor grayColorCNLive] forState:UIControlStateNormal]; | ||
| 50 | + [sortBtn addTarget:self action:@selector(sortBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 51 | + [self.sortBtnBackground addSubview:sortBtn]; | ||
| 52 | + width += rect.size.width + 13; | ||
| 62 | } | 53 | } |
| 54 | + self.sortBtnBackground.width = width; | ||
| 55 | + self.sortBtnBackground.x = KScreenWidth-self.sortBtnBackground.width-10; | ||
| 56 | + self.searchBtn.width = KScreenWidth-20-7-self.sortBtnBackground.width; | ||
| 57 | + [self addSubview:self.sortBtnBackground]; | ||
| 58 | + | ||
| 59 | + } else { | ||
| 60 | + | ||
| 61 | + self.searchBtn.width = KScreenWidth-20; | ||
| 62 | + [self.sortBtnBackground removeFromSuperview]; | ||
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| 65 | 65 |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelPagingView.m
| @@ -219,6 +219,7 @@ static NSString *MainHorizontalCellId = @"MainHorizontalCell"; | @@ -219,6 +219,7 @@ static NSString *MainHorizontalCellId = @"MainHorizontalCell"; | ||
| 219 | if (!self.searchView.superview) { | 219 | if (!self.searchView.superview) { |
| 220 | [_mainHeader addSubview:self.searchView]; | 220 | [_mainHeader addSubview:self.searchView]; |
| 221 | } | 221 | } |
| 222 | + _mainHeader.banners = _banners; | ||
| 222 | return _mainHeader; | 223 | return _mainHeader; |
| 223 | } else { | 224 | } else { |
| 224 | LVCSectionHeaderCollectionReusableView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:SectionHeaderId forIndexPath:indexPath]; | 225 | LVCSectionHeaderCollectionReusableView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:SectionHeaderId forIndexPath:indexPath]; |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCMainHeaderCollectionReusableView.m
| @@ -23,13 +23,20 @@ | @@ -23,13 +23,20 @@ | ||
| 23 | { | 23 | { |
| 24 | self = [super initWithFrame:frame]; | 24 | self = [super initWithFrame:frame]; |
| 25 | if (self) { | 25 | if (self) { |
| 26 | -// [self addSubview:self.searchView]; | ||
| 27 | [self addSubview:self.bannerView]; | 26 | [self addSubview:self.bannerView]; |
| 28 | [self addSubview:self.rollTableView]; | 27 | [self addSubview:self.rollTableView]; |
| 29 | } | 28 | } |
| 30 | return self; | 29 | return self; |
| 31 | } | 30 | } |
| 32 | 31 | ||
| 32 | +- (void)setBanners:(NSArray *)banners { | ||
| 33 | + | ||
| 34 | + if (_banners != banners) { | ||
| 35 | + _banners = banners; | ||
| 36 | + } | ||
| 37 | + _bannerView.bannerArray = banners; | ||
| 38 | +} | ||
| 39 | + | ||
| 33 | #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 40 | #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 34 | - (JBBannerView *)bannerView { | 41 | - (JBBannerView *)bannerView { |
| 35 | 42 |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCSectionHeaderCollectionReusableView.m
| @@ -33,9 +33,8 @@ | @@ -33,9 +33,8 @@ | ||
| 33 | - (void)setModel:(LVCChannelDetailModel *)model { | 33 | - (void)setModel:(LVCChannelDetailModel *)model { |
| 34 | if (_model != model) { | 34 | if (_model != model) { |
| 35 | _model = model; | 35 | _model = model; |
| 36 | - | ||
| 37 | - [self.button setTitle:[NSString stringWithFormat:@" %@", model.title] forState:UIControlStateNormal]; | ||
| 38 | } | 36 | } |
| 37 | + [self.button setTitle:[NSString stringWithFormat:@" %@", model.title] forState:UIControlStateNormal]; | ||
| 39 | } | 38 | } |
| 40 | 39 | ||
| 41 | #pragma mark - ACtion !!!!!!!!!!!!!!!!!!!!!!!!!! | 40 | #pragma mark - ACtion !!!!!!!!!!!!!!!!!!!!!!!!!! |