Skip to content

cyhsutw/CYOuterRoundedButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#CYOuterRoundedButton

CYOuterRoundedButton is a button with outer rounded corners, which are commonly used in web browsers. It's a subclass of UIButton with a custom layer mask applied.

screenshot

##Usage To use CYOuterRoundedButton just simply import the file and use it as the standard UIButton.

#import "CYOuterRoundedButton"

CYOuterRoundedButton *button = [[CYOuterRoundedButton alloc] initWithFrame:CGRectMake(40, 80,
                                                                                      100, 30)
                                                                      radius:4.0];
[self.view addSubview:button];

###Storyboard Support

Thanks for EJ's suggestion.

You may also use it in a storyboard-based project, just simply set an attribute named radius in your storyboard settings.

storyboard

###Note You may need to set the width of the button as DESIRED_WIDTH + 2*RADIUS in order to save spaces for bottom corners.

About

🖲 iOS button that looks like a browser tab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published