Update buttons view controller with arrows

Update buttons view controller with arrows
This commit is contained in:
Wenchao Ding 2016-06-25 17:35:00 +08:00
parent 5f9bec57b0
commit f2f680b906
7 changed files with 48 additions and 14 deletions

View File

@ -41,29 +41,19 @@
self.calendar = calendar;
UIButton *previousButton = [UIButton buttonWithType:UIButtonTypeCustom];
previousButton.frame = CGRectMake(5, 64+5, 90, 34);
previousButton.frame = CGRectMake(0, 64+5, 95, 34);
previousButton.backgroundColor = [UIColor whiteColor];
[previousButton setTitleColor:self.calendar.appearance.headerTitleColor forState:UIControlStateNormal];
[previousButton setTitle:@"PREV" forState:UIControlStateNormal];
previousButton.titleLabel.font = [UIFont systemFontOfSize:15];
previousButton.layer.cornerRadius = 3;
previousButton.layer.borderWidth = 1;
previousButton.clipsToBounds = YES;
previousButton.layer.borderColor = self.calendar.appearance.headerTitleColor.CGColor;
[previousButton setImage:[UIImage imageNamed:@"icon_prev"] forState:UIControlStateNormal];
[previousButton addTarget:self action:@selector(previousClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:previousButton];
self.previousButton = previousButton;
UIButton *nextButton = [UIButton buttonWithType:UIButtonTypeCustom];
nextButton.frame = CGRectMake(CGRectGetWidth(self.view.frame)-90-5, 64+5, 90, 34);
nextButton.frame = CGRectMake(CGRectGetWidth(self.view.frame)-95, 64+5, 95, 34);
nextButton.backgroundColor = [UIColor whiteColor];
[nextButton setTitleColor:self.calendar.appearance.headerTitleColor forState:UIControlStateNormal];
[nextButton setTitle:@"NEXT" forState:UIControlStateNormal];
nextButton.titleLabel.font = [UIFont systemFontOfSize:15];
nextButton.layer.cornerRadius = 3;
nextButton.layer.borderWidth = 1;
nextButton.clipsToBounds = YES;
nextButton.layer.borderColor = self.calendar.appearance.headerTitleColor.CGColor;
[nextButton setImage:[UIImage imageNamed:@"icon_next"] forState:UIControlStateNormal];
[nextButton addTarget:self action:@selector(nextClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:nextButton];
self.nextButton = nextButton;

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_next@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "icon_next@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_prev@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "icon_prev@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB