|
@@ -23,14 +23,15 @@
|
|
|
[super viewDidLoad];
|
|
[super viewDidLoad];
|
|
|
self.scrollView.delegate = self;
|
|
self.scrollView.delegate = self;
|
|
|
self.tabControl.delegate = self;
|
|
self.tabControl.delegate = self;
|
|
|
|
|
+
|
|
|
self.weekVC = [[RankChildController alloc] init];
|
|
self.weekVC = [[RankChildController alloc] init];
|
|
|
self.weekVC.type = @"week";
|
|
self.weekVC.type = @"week";
|
|
|
self.monthVC = [[RankChildController alloc] init];
|
|
self.monthVC = [[RankChildController alloc] init];
|
|
|
self.monthVC.type = @"month";
|
|
self.monthVC.type = @"month";
|
|
|
[self addChildViewController:self.weekVC];
|
|
[self addChildViewController:self.weekVC];
|
|
|
[self addChildViewController:self.monthVC];
|
|
[self addChildViewController:self.monthVC];
|
|
|
- self.weekVC.view.frame = CGRectMake(0, 0, self.scrollView.bounds.size.width, self.scrollView.bounds.size.height);
|
|
|
|
|
- self.monthVC.view.frame = CGRectMake(self.scrollView.bounds.size.width, 0, self.scrollView.bounds.size.width, self.scrollView.bounds.size.height);
|
|
|
|
|
|
|
+ self.weekVC.view.frame = CGRectMake(0, 0, ScreenWidth, self.scrollView.bounds.size.height);
|
|
|
|
|
+ self.monthVC.view.frame = CGRectMake(ScreenWidth, 0, ScreenWidth, self.scrollView.bounds.size.height);
|
|
|
[self.scrollView addSubview:self.weekVC.view];
|
|
[self.scrollView addSubview:self.weekVC.view];
|
|
|
[self.scrollView addSubview:self.monthVC.view];
|
|
[self.scrollView addSubview:self.monthVC.view];
|
|
|
}
|
|
}
|
|
@@ -46,6 +47,12 @@
|
|
|
|
|
|
|
|
- (void)viewDidLayoutSubviews {
|
|
- (void)viewDidLayoutSubviews {
|
|
|
[super viewDidLayoutSubviews];
|
|
[super viewDidLayoutSubviews];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ self.weekVC.view.frame = CGRectMake(0, 0, ScreenWidth, self.scrollView.bounds.size.height);
|
|
|
|
|
+ self.monthVC.view.frame = CGRectMake(ScreenWidth, 0, ScreenWidth, self.scrollView.bounds.size.height);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
CAGradientLayer *gl = [CAGradientLayer layer];
|
|
CAGradientLayer *gl = [CAGradientLayer layer];
|
|
|
gl.frame = self.view.bounds;
|
|
gl.frame = self.view.bounds;
|
|
|
gl.startPoint = CGPointMake(0.5, 0);
|
|
gl.startPoint = CGPointMake(0.5, 0);
|