|
|
|
|
22
|
- (void)viewDidLoad {
|
22
|
- (void)viewDidLoad {
|
23
|
[super viewDidLoad];
|
23
|
[super viewDidLoad];
|
24
|
[self setUpPageVc];
|
24
|
[self setUpPageVc];
|
25
|
- self.navigationController.navigationBar.barTintColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:SCREEN_WIDTH];
|
|
|
|
|
25
|
+ UIButton *returnBtn =[[UIButton alloc]initWithFrame:CGRectMake(0, KDStatusHeight, 0, 0)];
|
|
|
26
|
+ [returnBtn setImage:[UIImage imageNamed:@"return_white"] forState:UIControlStateNormal];
|
|
|
27
|
+ [returnBtn addTarget:self action:@selector(returnClickBtn) forControlEvents:UIControlEventTouchUpInside];
|
|
|
28
|
+ self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:returnBtn]; self.navigationController.navigationBar.barTintColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:SCREEN_WIDTH];
|
26
|
}
|
29
|
}
|
27
|
- (void)setUpPageVc{
|
30
|
- (void)setUpPageVc{
|
28
|
self.navBar.hidden=YES;
|
31
|
self.navBar.hidden=YES;
|
29
|
-
|
|
|
30
|
titleArray=@[@"收藏夹",@"浏览记录"];
|
32
|
titleArray=@[@"收藏夹",@"浏览记录"];
|
31
|
[UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleDefault;
|
33
|
[UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleDefault;
|
32
|
|
34
|
|
33
|
-
|
|
|
34
|
XLPageViewControllerConfig *config = [[XLPageViewControllerConfig alloc] init];
|
35
|
XLPageViewControllerConfig *config = [[XLPageViewControllerConfig alloc] init];
|
35
|
//标题间距
|
36
|
//标题间距
|
36
|
config.titleSpace = 25;
|
37
|
config.titleSpace = 25;
|
|
|
|
|
88
|
}
|
89
|
}
|
89
|
|
90
|
|
90
|
- (void)pageViewController:(XLPageViewController *)pageViewController didSelectedAtIndex:(NSInteger)index{
|
91
|
- (void)pageViewController:(XLPageViewController *)pageViewController didSelectedAtIndex:(NSInteger)index{
|
91
|
- NSLog(@"%ld",index);
|
|
|
|
|
92
|
+ NSLog(@"%ld",(long)index);
|
92
|
}
|
93
|
}
|
93
|
|
94
|
|
94
|
- (UIViewController *)pageViewController:(XLPageViewController *)pageViewController viewControllerForIndex:(NSInteger)index{
|
95
|
- (UIViewController *)pageViewController:(XLPageViewController *)pageViewController viewControllerForIndex:(NSInteger)index{
|