Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remotevision/CurledViews
Objective-C Category for a custom UIButton with curled corners and shadow
https://github.com/remotevision/CurledViews
Last synced: about 1 month ago
JSON representation
Objective-C Category for a custom UIButton with curled corners and shadow
- Host: GitHub
- URL: https://github.com/remotevision/CurledViews
- Owner: remotevision
- License: other
- Created: 2012-02-13T02:40:50.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-02-14T02:00:36.000Z (almost 13 years ago)
- Last Synced: 2023-10-20T22:48:32.576Z (about 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 216 KB
- Stars: 145
- Watchers: 20
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - CurledViews - Objective-C Category for a custom UIButton with curled corners and shadow (etc)
- awesome - CurledViews - Objective-C Category for a custom UIButton with curled corners and shadow (etc)
README
# What are these categories for?
While building a kids math game for iOS, I needed a custom UIButton that would make the user's profile picture look like a bordered photo that was naturally taped or paperclipped to the notebook.
![screenshot](https://github.com/remotevision/CurledViews/blob/master/screenshot.png?raw=true)
# Using the library
You'll need to import the CurledViewBase and either UIButton+Curled or UIImageView+Curled files into your project:
To use it:
// instantiate your UIButton or UIImageView (outlet or programatically, doesn't matter)
// if UIButton, specify the UIControlState
[photoButton setImage:[UIImage imageNamed:@"raptor_face.png"] borderWidth:5.0 shadowDepth:10.0 controlPointXOffset:30.0 controlPointYOffset:70.0 forState:UIControlStateNormal];
That's it! Feel free to fork and add pull requests so we can incorporate your changes for everyone.