diff --git a/Example/ButtonsViewController.m b/Example/ButtonsViewController.m index a8f4f79..31da2cf 100644 --- a/Example/ButtonsViewController.m +++ b/Example/ButtonsViewController.m @@ -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; diff --git a/Example/Images.xcassets/icon_next.imageset/Contents.json b/Example/Images.xcassets/icon_next.imageset/Contents.json new file mode 100644 index 0000000..b35930a --- /dev/null +++ b/Example/Images.xcassets/icon_next.imageset/Contents.json @@ -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" + } +} \ No newline at end of file diff --git a/Example/Images.xcassets/icon_next.imageset/icon_next@2x.png b/Example/Images.xcassets/icon_next.imageset/icon_next@2x.png new file mode 100755 index 0000000..6406d1b Binary files /dev/null and b/Example/Images.xcassets/icon_next.imageset/icon_next@2x.png differ diff --git a/Example/Images.xcassets/icon_next.imageset/icon_next@3x.png b/Example/Images.xcassets/icon_next.imageset/icon_next@3x.png new file mode 100755 index 0000000..b334d3a Binary files /dev/null and b/Example/Images.xcassets/icon_next.imageset/icon_next@3x.png differ diff --git a/Example/Images.xcassets/icon_prev.imageset/Contents.json b/Example/Images.xcassets/icon_prev.imageset/Contents.json new file mode 100644 index 0000000..dcf0924 --- /dev/null +++ b/Example/Images.xcassets/icon_prev.imageset/Contents.json @@ -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" + } +} \ No newline at end of file diff --git a/Example/Images.xcassets/icon_prev.imageset/icon_prev@2x.png b/Example/Images.xcassets/icon_prev.imageset/icon_prev@2x.png new file mode 100755 index 0000000..9b24667 Binary files /dev/null and b/Example/Images.xcassets/icon_prev.imageset/icon_prev@2x.png differ diff --git a/Example/Images.xcassets/icon_prev.imageset/icon_prev@3x.png b/Example/Images.xcassets/icon_prev.imageset/icon_prev@3x.png new file mode 100755 index 0000000..14a8ee4 Binary files /dev/null and b/Example/Images.xcassets/icon_prev.imageset/icon_prev@3x.png differ