diff --git a/redstar.xcodeproj/project.pbxproj b/redstar.xcodeproj/project.pbxproj index c97e5e9ff437d628c9b0f3fa8b5e71144cd2713c..fa7fa1ba68e77abb5158058631fdc059bea1a2b9 100644 --- a/redstar.xcodeproj/project.pbxproj +++ b/redstar.xcodeproj/project.pbxproj @@ -26,6 +26,12 @@ 8474C5921BE78A85007DCF19 /* QuestionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8474C5901BE78A85007DCF19 /* QuestionViewController.m */; }; 8474C5951BE78AE1007DCF19 /* QuestionDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8474C5941BE78AE1007DCF19 /* QuestionDetailViewController.m */; }; 8474C5991BE78BBC007DCF19 /* QuestionDetailCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8474C5981BE78BBC007DCF19 /* QuestionDetailCell.m */; }; + 8480BEA21C14326100E2F18F /* MoreScreenView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8480BEA11C14326100E2F18F /* MoreScreenView.m */; }; + 8480BEA61C14378C00E2F18F /* ScopeTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8480BEA51C14378C00E2F18F /* ScopeTableView.m */; }; + 8480BEA91C143A0800E2F18F /* GroupTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8480BEA81C143A0800E2F18F /* GroupTableView.m */; }; + 8480BEAC1C143A1600E2F18F /* CategoryTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8480BEAB1C143A1600E2F18F /* CategoryTableView.m */; }; + 8480BEAF1C143A2200E2F18F /* TimeTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8480BEAE1C143A2200E2F18F /* TimeTableView.m */; }; + 8480BEB21C143A4100E2F18F /* StateTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8480BEB11C143A4100E2F18F /* StateTableView.m */; }; 84846E971BE069BC0010550A /* DateButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 84846E961BE069BC0010550A /* DateButton.m */; }; 84846E9A1BE07CDF0010550A /* RankingListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84846E991BE07CDF0010550A /* RankingListCell.m */; }; 848699B01BDF810900859DFE /* InspectListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8486999F1BDF810900859DFE /* InspectListCell.m */; }; @@ -180,6 +186,18 @@ 8474C5941BE78AE1007DCF19 /* QuestionDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionDetailViewController.m; sourceTree = "<group>"; }; 8474C5971BE78BBC007DCF19 /* QuestionDetailCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuestionDetailCell.h; sourceTree = "<group>"; }; 8474C5981BE78BBC007DCF19 /* QuestionDetailCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionDetailCell.m; sourceTree = "<group>"; }; + 8480BEA01C14326100E2F18F /* MoreScreenView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoreScreenView.h; sourceTree = "<group>"; }; + 8480BEA11C14326100E2F18F /* MoreScreenView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoreScreenView.m; sourceTree = "<group>"; }; + 8480BEA41C14378C00E2F18F /* ScopeTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScopeTableView.h; sourceTree = "<group>"; }; + 8480BEA51C14378C00E2F18F /* ScopeTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScopeTableView.m; sourceTree = "<group>"; }; + 8480BEA71C143A0800E2F18F /* GroupTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupTableView.h; sourceTree = "<group>"; }; + 8480BEA81C143A0800E2F18F /* GroupTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupTableView.m; sourceTree = "<group>"; }; + 8480BEAA1C143A1600E2F18F /* CategoryTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CategoryTableView.h; sourceTree = "<group>"; }; + 8480BEAB1C143A1600E2F18F /* CategoryTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CategoryTableView.m; sourceTree = "<group>"; }; + 8480BEAD1C143A2200E2F18F /* TimeTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeTableView.h; sourceTree = "<group>"; }; + 8480BEAE1C143A2200E2F18F /* TimeTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TimeTableView.m; sourceTree = "<group>"; }; + 8480BEB01C143A4100E2F18F /* StateTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StateTableView.h; sourceTree = "<group>"; }; + 8480BEB11C143A4100E2F18F /* StateTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StateTableView.m; sourceTree = "<group>"; }; 84846E951BE069BC0010550A /* DateButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateButton.h; sourceTree = "<group>"; }; 84846E961BE069BC0010550A /* DateButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateButton.m; sourceTree = "<group>"; }; 84846E981BE07CDF0010550A /* RankingListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankingListCell.h; sourceTree = "<group>"; }; @@ -686,8 +704,11 @@ 8474C58D1BE78A85007DCF19 /* View */ = { isa = PBXGroup; children = ( + 8480BEA31C14377200E2F18F /* SubViews */, 8487D7701BF19A9C00E63E90 /* SearchToolBar.h */, 8487D7711BF19A9C00E63E90 /* SearchToolBar.m */, + 8480BEA01C14326100E2F18F /* MoreScreenView.h */, + 8480BEA11C14326100E2F18F /* MoreScreenView.m */, ); path = View; sourceTree = "<group>"; @@ -714,6 +735,23 @@ path = Cell; sourceTree = "<group>"; }; + 8480BEA31C14377200E2F18F /* SubViews */ = { + isa = PBXGroup; + children = ( + 8480BEA41C14378C00E2F18F /* ScopeTableView.h */, + 8480BEA51C14378C00E2F18F /* ScopeTableView.m */, + 8480BEA71C143A0800E2F18F /* GroupTableView.h */, + 8480BEA81C143A0800E2F18F /* GroupTableView.m */, + 8480BEAA1C143A1600E2F18F /* CategoryTableView.h */, + 8480BEAB1C143A1600E2F18F /* CategoryTableView.m */, + 8480BEB01C143A4100E2F18F /* StateTableView.h */, + 8480BEB11C143A4100E2F18F /* StateTableView.m */, + 8480BEAD1C143A2200E2F18F /* TimeTableView.h */, + 8480BEAE1C143A2200E2F18F /* TimeTableView.m */, + ); + path = SubViews; + sourceTree = "<group>"; + }; 8486999B1BDF810900859DFE /* Inspect */ = { isa = PBXGroup; children = ( @@ -1920,6 +1958,7 @@ 8487D8091BF20FAD00E63E90 /* TaxisView.m in Sources */, 84A673C71C0C7E0C000F828E /* AnnounceDetailHeadView.m in Sources */, 84AD4F361BF45BEB00BFB37C /* InspectSortTableCell.m in Sources */, + 8480BEA21C14326100E2F18F /* MoreScreenView.m in Sources */, 84970E281BD8DEFE00C1728A /* AppDelegate.m in Sources */, 849B2F771C0CABE6005D809F /* AnnounceDetailModel.m in Sources */, 8490C4C31BF9A394006B6569 /* CustomPageControl.m in Sources */, @@ -1936,6 +1975,7 @@ 8487D80C1BF218F900E63E90 /* MenuView.m in Sources */, 84CC34CE1C093C2F002F10E2 /* OnLineViewController.m in Sources */, 84D8636E1C1148EC00E4F4CC /* InpectPictureCell.m in Sources */, + 8480BEAF1C143A2200E2F18F /* TimeTableView.m in Sources */, 8474C5921BE78A85007DCF19 /* QuestionViewController.m in Sources */, 84A673BF1C0C7AEB000F828E /* AnnounceModel.m in Sources */, 84CC34CD1C093C2F002F10E2 /* OnLineFooterView.m in Sources */, @@ -1943,6 +1983,7 @@ 84FAC7611BFF2C6E00FD094D /* NoDataView.m in Sources */, 84A673C41C0C7B0A000F828E /* AnnoDetailViewController.m in Sources */, 84AD4F2F1BF4370E00BFB37C /* InspectHeaderView.m in Sources */, + 8480BEAC1C143A1600E2F18F /* CategoryTableView.m in Sources */, 84F57C9C1BECA73800DDEEB1 /* StarBar.m in Sources */, 84F57C4C1BEC785E00DDEEB1 /* AddQuestionViewController.m in Sources */, 84D80EB51BF714BE00A10EA4 /* GroupItems.m in Sources */, @@ -1962,13 +2003,16 @@ 84A673911C0C2681000F828E /* FunctionViewController.m in Sources */, 848699B61BDF812F00859DFE /* RankingListViewController.m in Sources */, 84D825821BDD35E000CC61F7 /* HomeHeaderView.m in Sources */, + 8480BEA61C14378C00E2F18F /* ScopeTableView.m in Sources */, 84FD89F21BD9FC71006E442A /* HomeViewController.m in Sources */, 84AD4F461BF4A9E800BFB37C /* RankHeadView.m in Sources */, + 8480BEA91C143A0800E2F18F /* GroupTableView.m in Sources */, 84E420411BE849FC00689976 /* QuestionDescribeCell.m in Sources */, 84DB9BC71BDCD67200822CC4 /* UIView+Extension.m in Sources */, 8462C6EC1BF5F3BE00344DDD /* MenuButton.m in Sources */, 8442BA5C1BDB8FDB005E5657 /* MineTableHeaderView.m in Sources */, 84CC34E21C09583D002F10E2 /* LookOnLineTableViewCell.m in Sources */, + 8480BEB21C143A4100E2F18F /* StateTableView.m in Sources */, 849B2F711C0CA22F005D809F /* AnnoContentTableViewCell.m in Sources */, 84D3E6021C04DA85001FF1DD /* InspectUpLoadFootView.m in Sources */, 84A673881C0B50B4000F828E /* OnLineCompleteViewController.m in Sources */, diff --git a/redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate b/redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate index 1c910e494efcc63bcd61e2af8e5fccceaf35e28c..d6ceb1e84e3a2cfa70f6494c5ea91cbd1a5e16b8 100644 Binary files a/redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate and b/redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/MoreScreenView.h b/redstar/Classes/Module/Function/Question/QuestionList/View/MoreScreenView.h new file mode 100644 index 0000000000000000000000000000000000000000..70518bd5b4e6c568708cd3cd091971a3dec04acf --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/MoreScreenView.h @@ -0,0 +1,30 @@ +// +// MoreScreenView.h +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import <UIKit/UIKit.h> +#import "GroupTabBar.h" + +#import "ScopeTableView.h" +#import "GroupTableView.h" +#import "CategoryTableView.h" +#import "StateTableView.h" +#import "TimeTableView.h" + +@interface MoreScreenView : UIView +@property (nonatomic, strong) GroupTabBar *groupTabBar; // é‡ç½® + +@property (nonatomic, strong) UIButton *resetBtn; // é‡ç½® +@property (nonatomic, strong) UIButton *submitBtn; // æäº¤ + +@property (nonatomic, strong) ScopeTableView *scopeTableView; +@property (nonatomic, strong) GroupTableView *groupTableView; +@property (nonatomic, strong) CategoryTableView *categoryTableView; +@property (nonatomic, strong) StateTableView *stateTableView; +@property (nonatomic, strong) TimeTableView *timeTableView; + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/MoreScreenView.m b/redstar/Classes/Module/Function/Question/QuestionList/View/MoreScreenView.m new file mode 100644 index 0000000000000000000000000000000000000000..1eda92b5ad70184a1f4f1aba9bfceefa3505bf29 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/MoreScreenView.m @@ -0,0 +1,166 @@ +// +// MoreScreenView.m +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import "MoreScreenView.h" +#import "GroupItems.h" + +#define SELECTED_VIEW_CONTROLLER_TAG 23656534 + +@interface MoreScreenView ()<GroupTabBarDelegate, UITextViewDelegate> +@property (nonatomic, strong) UIView *backView; +@end + +@implementation MoreScreenView + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setup]; + } + return self; +} + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self setup]; + } + return self; +} + + +- (void)setup +{ + + self.groupTabBar = [[GroupTabBar alloc] initWithFrame:CGRectMake(0, 0, 100, 180)]; + _groupTabBar.delegate = self; + [self addSubview:_groupTabBar]; + + + + + self.scopeTableView = [[ScopeTableView alloc] init]; + GroupItems *scopeItem = [[GroupItems alloc] initWithTitle:@"问题范围" view:_scopeTableView]; + + self.groupTableView = [[GroupTableView alloc] init]; + GroupItems *groupItem = [[GroupItems alloc] initWithTitle:@"问题分组" view:_groupTableView]; + + self.categoryTableView = [[CategoryTableView alloc] init]; + GroupItems *categoryItem = [[GroupItems alloc] initWithTitle:@"问题分类" view:_categoryTableView]; + + self.stateTableView = [[StateTableView alloc] init]; + GroupItems *stateItem = [[GroupItems alloc] initWithTitle:@"问题状æ€" view:_stateTableView]; + + self.timeTableView = [[TimeTableView alloc] init]; + GroupItems *timeItem = [[GroupItems alloc] initWithTitle:@"时间段" view:_timeTableView]; + + [self insertSubview:_scopeTableView belowSubview:_groupTabBar]; + [self insertSubview:_groupTableView belowSubview:_groupTabBar]; + [self insertSubview:_categoryTableView belowSubview:_groupTabBar]; + [self insertSubview:_stateTableView belowSubview:_groupTabBar]; + [self insertSubview:_timeTableView belowSubview:_groupTabBar]; + + _groupTabBar.items = @[scopeItem, groupItem, categoryItem, stateItem, timeItem]; + [_groupTabBar showIndex:0]; + + self.backView.backgroundColor = [UIColor whiteColor]; + [self.resetBtn setTitle:@"é‡ç½®" forState:UIControlStateNormal]; + [self.submitBtn setTitle:@"æäº¤" forState:UIControlStateNormal]; + +} + + +- (void)switchView:(UIView *)view +{ + UIView *currentView = [self viewWithTag:SELECTED_VIEW_CONTROLLER_TAG]; + [currentView removeFromSuperview]; + currentView = nil; + + view.frame = CGRectMake(self.groupTabBar.frame.size.width,0,kScreenWidth - self.groupTabBar.frame.size.width, self.groupTabBar.size.height); + + view.tag = SELECTED_VIEW_CONTROLLER_TAG; + + [self insertSubview:view belowSubview:_groupTabBar]; + +} + +- (UIView *)backView +{ + if (!_backView) { + _backView = [[UIView alloc] init]; + _backView.translatesAutoresizingMaskIntoConstraints = NO; + [self addSubview:_backView]; + + NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_backView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.groupTabBar attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; + [self addConstraint:lineViewTop]; + + NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_backView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; + [self addConstraint:lineViewRight]; + + NSLayoutConstraint *lineViewBottom = [NSLayoutConstraint constraintWithItem:_backView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; + [self addConstraint:lineViewBottom]; + + NSLayoutConstraint *lineViewLeft = [NSLayoutConstraint constraintWithItem:_backView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; + [self addConstraint:lineViewLeft]; + } + return _backView; +} + +- (UIButton *)resetBtn +{ + if (!_resetBtn) { + _resetBtn = [[UIButton alloc] init]; + _resetBtn.backgroundColor = [UIColor grayColor]; + _resetBtn.translatesAutoresizingMaskIntoConstraints = NO; + _resetBtn.layer.cornerRadius = 4.0; + [self.backView addSubview:_resetBtn]; + + NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeTop multiplier:1.0 constant:7.5]; + [self.backView addConstraint:lineViewTop]; + + NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:-20]; + [self.backView addConstraint:lineViewRight]; + + NSLayoutConstraint *lineViewBottom = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-7.5]; + [self.backView addConstraint:lineViewBottom]; + + NSLayoutConstraint *lineViewLeft = [NSLayoutConstraint constraintWithItem:_resetBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20]; + [self.backView addConstraint:lineViewLeft]; + } + return _resetBtn; +} + +- (UIButton *)submitBtn +{ + if (!_submitBtn) { + _submitBtn = [[UIButton alloc] init]; + _submitBtn.backgroundColor = kNavigationBarColor; + _submitBtn.translatesAutoresizingMaskIntoConstraints = NO; + _submitBtn.layer.cornerRadius = 4.0; + [self.backView addSubview:_submitBtn]; + + NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeTop multiplier:1.0 constant:7.5]; + [self.backView addConstraint:lineViewTop]; + + NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20]; + [self.backView addConstraint:lineViewRight]; + + NSLayoutConstraint *lineViewBottom = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-7.5]; + [self.backView addConstraint:lineViewBottom]; + + NSLayoutConstraint *lineViewLeft = [NSLayoutConstraint constraintWithItem:_submitBtn attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:20]; + [self.backView addConstraint:lineViewLeft]; + } + return _submitBtn; +} + + + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.h b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.h new file mode 100644 index 0000000000000000000000000000000000000000..d38b3a2ccd45bfa3f222fe55ff1b6ba0e8a737dc --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.h @@ -0,0 +1,13 @@ +// +// CategoryTableView.h +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import <UIKit/UIKit.h> + +@interface CategoryTableView : UITableView + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.m b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.m new file mode 100644 index 0000000000000000000000000000000000000000..57db6f8f26cf75fdf15749bec1b2a08558fc3c32 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.m @@ -0,0 +1,85 @@ +// +// CategoryTableView.m +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import "CategoryTableView.h" +@interface CategoryTableView ()<UITableViewDelegate, UITableViewDataSource> +@property (nonatomic, strong) NSMutableArray *titleArray; +@end +@implementation CategoryTableView + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setup]; + } + return self; +} + + +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style +{ + self = [super initWithFrame:frame style:style]; + if (self) { + [self setup]; + } + return self; +} + +- (void)setup +{ + self.titleArray = [NSMutableArray arrayWithObjects:@"全部问题",@"我的问题", nil]; + self.delegate = self; + self.dataSource = self; + + NSInteger selectedIndex = 0; + NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0]; + [self selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; +} + + +#pragma mark - TableView Delegate/DataSource + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return _titleArray.count; +} + + +// cell显示的内容 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"categoryCell"]; + if (!cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"categoryCell"]; + } + cell.textLabel.text = _titleArray[indexPath.row]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; +} + +// cell点击事件 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + +} + + +// section高度 +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.h b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.h new file mode 100644 index 0000000000000000000000000000000000000000..a7a8e8870a4eb1537f806601e2363ce742f1b0ec --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.h @@ -0,0 +1,13 @@ +// +// GroupTableView.h +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import <UIKit/UIKit.h> + +@interface GroupTableView : UITableView + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.m b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.m new file mode 100644 index 0000000000000000000000000000000000000000..839704ef4973e84bcabefd46a1c44f3440b272a4 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.m @@ -0,0 +1,86 @@ +// +// GroupTableView.m +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import "GroupTableView.h" +@interface GroupTableView ()<UITableViewDelegate, UITableViewDataSource> +@property (nonatomic, strong) NSMutableArray *titleArray; +@end +@implementation GroupTableView + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setup]; + } + return self; +} + + +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style +{ + self = [super initWithFrame:frame style:style]; + if (self) { + [self setup]; + } + return self; +} + +- (void)setup +{ + self.titleArray = [NSMutableArray arrayWithObjects:@"全部问题",@"我的问题", nil]; + self.delegate = self; + self.dataSource = self; + + NSInteger selectedIndex = 0; + NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0]; + [self selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; +} + + +#pragma mark - TableView Delegate/DataSource + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return _titleArray.count; +} + + +// cell显示的内容 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"groupCell"]; + if (!cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"groupCell"]; + } + cell.textLabel.text = _titleArray[indexPath.row]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; +} + +// cell点击事件 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + +} + + +// section高度 +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + + + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/ScopeTableView.h b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/ScopeTableView.h new file mode 100644 index 0000000000000000000000000000000000000000..8f6c2eed14d3269cddbdfb27abbad10bf413cd00 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/ScopeTableView.h @@ -0,0 +1,13 @@ +// +// ScopeTableView.h +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import <UIKit/UIKit.h> + +@interface ScopeTableView : UITableView + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/ScopeTableView.m b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/ScopeTableView.m new file mode 100644 index 0000000000000000000000000000000000000000..e1b37bfa2b8bcc4e36f5bbfcb29907ff42078896 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/ScopeTableView.m @@ -0,0 +1,87 @@ +// +// ScopeTableView.m +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import "ScopeTableView.h" + +@interface ScopeTableView ()<UITableViewDelegate, UITableViewDataSource> +@property (nonatomic, strong) NSMutableArray *titleArray; +@end + +@implementation ScopeTableView + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setup]; + } + return self; +} + + +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style +{ + self = [super initWithFrame:frame style:style]; + if (self) { + [self setup]; + } + return self; +} + +- (void)setup +{ + self.titleArray = [NSMutableArray arrayWithObjects:@"全部问题",@"我的问题", nil]; + self.delegate = self; + self.dataSource = self; + + NSInteger selectedIndex = 0; + NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0]; + [self selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; +} + + +#pragma mark - TableView Delegate/DataSource + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return _titleArray.count; +} + + +// cell显示的内容 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"scopeCell"]; + if (!cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"scopeCell"]; + } + cell.textLabel.text = _titleArray[indexPath.row]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; +} + +// cell点击事件 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + +} + + +// section高度 +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/StateTableView.h b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/StateTableView.h new file mode 100644 index 0000000000000000000000000000000000000000..e16ebf1ad6d87015372ed59c20664ce68a96a9b1 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/StateTableView.h @@ -0,0 +1,13 @@ +// +// StateTableView.h +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import <UIKit/UIKit.h> + +@interface StateTableView : UITableView + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/StateTableView.m b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/StateTableView.m new file mode 100644 index 0000000000000000000000000000000000000000..b8f55b47d29995a5995e21678b2715c91ca890f3 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/StateTableView.m @@ -0,0 +1,86 @@ +// +// StateTableView.m +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import "StateTableView.h" +@interface StateTableView ()<UITableViewDelegate, UITableViewDataSource> +@property (nonatomic, strong) NSMutableArray *titleArray; +@end +@implementation StateTableView + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setup]; + } + return self; +} + + +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style +{ + self = [super initWithFrame:frame style:style]; + if (self) { + [self setup]; + } + return self; +} + +- (void)setup +{ + self.titleArray = [NSMutableArray arrayWithObjects:@"全部问题",@"我的问题", nil]; + self.delegate = self; + self.dataSource = self; + + NSInteger selectedIndex = 0; + NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0]; + [self selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; +} + + +#pragma mark - TableView Delegate/DataSource + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return _titleArray.count; +} + + +// cell显示的内容 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"stateCell"]; + if (!cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"stateCell"]; + } + cell.textLabel.text = _titleArray[indexPath.row]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; +} + +// cell点击事件 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + +} + + +// section高度 +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + + + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/TimeTableView.h b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/TimeTableView.h new file mode 100644 index 0000000000000000000000000000000000000000..36f2811c81385cc31e126977e353766fe6d4e837 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/TimeTableView.h @@ -0,0 +1,13 @@ +// +// TimeTableView.h +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import <UIKit/UIKit.h> + +@interface TimeTableView : UITableView + +@end diff --git a/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/TimeTableView.m b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/TimeTableView.m new file mode 100644 index 0000000000000000000000000000000000000000..9455d5957f3caa2dd2dda28c1d53356293a0d709 --- /dev/null +++ b/redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/TimeTableView.m @@ -0,0 +1,86 @@ +// +// TimeTableView.m +// redstar +// +// Created by admin on 15/12/6. +// Copyright © 2015å¹´ ZWF. All rights reserved. +// + +#import "TimeTableView.h" +@interface TimeTableView ()<UITableViewDelegate, UITableViewDataSource> +@property (nonatomic, strong) NSMutableArray *titleArray; +@end +@implementation TimeTableView + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setup]; + } + return self; +} + + +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style +{ + self = [super initWithFrame:frame style:style]; + if (self) { + [self setup]; + } + return self; +} + +- (void)setup +{ + self.titleArray = [NSMutableArray arrayWithObjects:@"全部问题",@"我的问题", nil]; + self.delegate = self; + self.dataSource = self; + + NSInteger selectedIndex = 0; + NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0]; + [self selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; +} + + +#pragma mark - TableView Delegate/DataSource + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return _titleArray.count; +} + + +// cell显示的内容 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"timeCell"]; + if (!cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"timeCell"]; + } + cell.textLabel.text = _titleArray[indexPath.row]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + return cell; +} + +// cell点击事件 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + +} + + +// section高度 +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return CGFLOAT_MIN; +} + + + +@end diff --git a/redstar/Classes/Module/Home/ViewController/HomeViewController.m b/redstar/Classes/Module/Home/ViewController/HomeViewController.m index bb086964c400647650dc96647673ab7e2bc3636b..41fa26395bfa3f8e8fd23839c0324a1e7a38b7ea 100644 --- a/redstar/Classes/Module/Home/ViewController/HomeViewController.m +++ b/redstar/Classes/Module/Home/ViewController/HomeViewController.m @@ -940,6 +940,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); if (![_searchTextField.text isEqualToString:@""]) { SearchViewController *searchVC = [[SearchViewController alloc] init]; searchVC.customStr = _searchTextField.text; + self.hidesBottomBarWhenPushed = YES; [self.navigationController pushViewController:searchVC animated:YES]; } else { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"æç¤º" message:@"请输入关键å—ï¼" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];