Skip to content

Commit 8655cc8

Browse files
committed
列表整体显示~
1 parent 5deb6e6 commit 8655cc8

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

Coding_iOS/Controllers/ProjectListViewController.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ - (void)viewDidLoad {
1616
self.icarouselScrollEnabled = YES;
1717
}
1818

19+
20+
-(void)viewWillAppear:(BOOL)animated
21+
{
22+
[super viewWillAppear:animated];
23+
[self.mySearchBar removeFromSuperview];
24+
}
25+
1926
- (void)setupNavBtn{
2027
self.navigationItem.leftBarButtonItem = nil;
2128
self.navigationItem.rightBarButtonItem = nil;

Coding_iOS/Controllers/RootControllers/Project_RootViewController.m

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#import "PopMenu.h"
2727
#import "PopFliterMenu.h"
2828

29+
2930
@interface Project_RootViewController ()<UISearchBarDelegate, UITableViewDataSource, UITableViewDelegate>
3031
@property (strong, nonatomic) XTSegmentControl *mySegmentControl;
3132
@property (strong, nonatomic) iCarousel *myCarousel;
@@ -85,7 +86,7 @@ - (void)viewDidLoad
8586
icarousel.bounceDistance = 0.2;
8687
[self.view addSubview:icarousel];
8788
[icarousel mas_makeConstraints:^(MASConstraintMaker *make) {
88-
make.edges.equalTo(self.view).insets(UIEdgeInsetsMake(kMySegmentControl_Height, 0, 0, 0));
89+
make.edges.equalTo(self.view);
8990
}];
9091
icarousel;
9192
});
@@ -111,13 +112,13 @@ - (void)viewDidLoad
111112
[_myFliterMenu refreshMenuDate];
112113

113114
//添加滑块
114-
_mySegmentControl = [[XTSegmentControl alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, kMySegmentControl_Height) Items:_segmentItems selectedBlock:^(NSInteger index) {
115-
if (index == _oldSelectedIndex) {
116-
return;
117-
}
118-
[weakCarousel scrollToItemAtIndex:index animated:NO];
119-
}];
120-
[self.view addSubview:_mySegmentControl];
115+
// _mySegmentControl = [[XTSegmentControl alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, kMySegmentControl_Height) Items:_segmentItems selectedBlock:^(NSInteger index) {
116+
// if (index == _oldSelectedIndex) {
117+
// return;
118+
// }
119+
// [weakCarousel scrollToItemAtIndex:index animated:NO];
120+
// }];
121+
// [self.view addSubview:_mySegmentControl];
121122
[self setupNavBtn];
122123
self.icarouselScrollEnabled = NO;
123124
}

0 commit comments

Comments
 (0)