https://github.com/dungntm58/rcstickerview
Add a label, image, another custom view as a sticker view.
https://github.com/dungntm58/rcstickerview
ios sticker swift ui-components
Last synced: 3 months ago
JSON representation
Add a label, image, another custom view as a sticker view.
- Host: GitHub
- URL: https://github.com/dungntm58/rcstickerview
- Owner: dungntm58
- License: mit
- Created: 2018-11-02T09:19:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T09:49:40.000Z (11 months ago)
- Last Synced: 2025-03-24T03:12:19.706Z (4 months ago)
- Topics: ios, sticker, swift, ui-components
- Language: Swift
- Homepage:
- Size: 96.7 KB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RCStickerView
[](https://travis-ci.org/dungntm58/RCStickerView)
[](https://cocoapods.org/pods/RCStickerView)
[](https://cocoapods.org/pods/RCStickerView)
[](https://cocoapods.org/pods/RCStickerView)## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
- Xcode 10.
- Swift 4.0.
- iOS 9.0 or higher.## Installation
RCStickerView is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'RCStickerView'
```Then, run the following command:
```bash
$ pod install
```## Usage
See the `Example` project for more details.
```swift
override func viewDidLoad() {
super.viewDidLoad()
let testView = UIView(frame: CGRect(x: 0, y: 0, width: 150, height: 100))
testView.backgroundColor = .red
let stickerView = RCStickerView(contentView: testView)
stickerView.center = self.view.center
stickerView.delegate = self
stickerView.outlineBorderColor = .blue
stickerView.set(image: UIImage(named: "Close"), for: .close)
stickerView.set(image: UIImage(named: "Rotate"), for: .rotate)
stickerView.set(image: UIImage(named: "Flip"), for: .flipX)
stickerView.isEnableFlipY = false
stickerView.handlerSize = 40
self.view.addSubview(stickerView)
}
```## Inspiration
RCStickerView is heavily inspired by CHTStickerView.
## Author
RobertNguyen, [email protected]
## License
RCStickerView is available under the MIT license. See the LICENSE file for more info.