diff --git a/Sources/LCActionSheet.m b/Sources/LCActionSheet.m index 4c5924b..e3191b2 100644 --- a/Sources/LCActionSheet.m +++ b/Sources/LCActionSheet.m @@ -336,7 +336,7 @@ - (void)setupView { cancelButton.titleLabel.font = self.buttonFont; [cancelButton setTitle:self.cancelButtonTitle forState:UIControlStateNormal]; [cancelButton setTitleColor:self.buttonColor forState:UIControlStateNormal]; - [cancelButton setBackgroundImage:[UIImage imageWithColor:self.separatorColor] + [cancelButton setBackgroundImage:[UIImage lc_imageWithColor:self.separatorColor] forState:UIControlStateHighlighted]; [cancelButton addTarget:self action:@selector(cancelButtonClicked) @@ -546,7 +546,7 @@ - (void)setSeparatorColor:(UIColor *)separatorColor { self.lineView.backgroundColor = separatorColor; self.divisionView.backgroundColor = separatorColor; - [self.cancelButton setBackgroundImage:[UIImage imageWithColor:separatorColor] + [self.cancelButton setBackgroundImage:[UIImage lc_imageWithColor:separatorColor] forState:UIControlStateHighlighted]; [self.tableView reloadData]; } diff --git a/Sources/UIImage+LCActionSheet.h b/Sources/UIImage+LCActionSheet.h index ed2b3d1..50c334c 100644 --- a/Sources/UIImage+LCActionSheet.h +++ b/Sources/UIImage+LCActionSheet.h @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Create a image with the color. */ -+ (nullable instancetype)imageWithColor:(UIColor *)color; ++ (nullable instancetype)lc_imageWithColor:(UIColor *)color; @end diff --git a/Sources/UIImage+LCActionSheet.m b/Sources/UIImage+LCActionSheet.m index 06a8044..5ef752d 100644 --- a/Sources/UIImage+LCActionSheet.m +++ b/Sources/UIImage+LCActionSheet.m @@ -29,7 +29,7 @@ @implementation UIImage (LCActionSheet) -+ (instancetype)imageWithColor:(UIColor *)color { ++ (instancetype)lc_imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f, 0.0f, 2.0f, 2.0f); UIGraphicsBeginImageContext(rect.size);