Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peterprokop/StarryStars
StarryStars is iOS GUI library for displaying and editing ratings
https://github.com/peterprokop/StarryStars
Last synced: 3 days ago
JSON representation
StarryStars is iOS GUI library for displaying and editing ratings
- Host: GitHub
- URL: https://github.com/peterprokop/StarryStars
- Owner: peterprokop
- License: mit
- Created: 2015-11-01T07:20:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-10-26T14:45:08.000Z (about 5 years ago)
- Last Synced: 2024-11-27T12:25:36.365Z (15 days ago)
- Language: Swift
- Homepage:
- Size: 52.7 KB
- Stars: 174
- Watchers: 6
- Forks: 23
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - StarryStars - StarryStars is iOS GUI library for displaying and editing ratings (UI / Rating Stars)
- awesome-swift - StarryStars - Display & edit ratings, fully customizable from interface builder. (Libs / UI)
- awesome-swift - StarryStars - Display & edit ratings, fully customizable from interface builder. (Libs / UI)
- awesome-ios-star - StarryStars - StarryStars is iOS GUI library for displaying and editing ratings (UI / Rating Stars)
- fucking-awesome-swift - StarryStars - Display & edit ratings, fully customizable from interface builder. (Libs / UI)
- awesome-swift-cn - StarryStars - Display & edit ratings, fully customizable from interface builder. (Libs / UI)
- awesome-swift - StarryStars - StarryStars is iOS GUI library for displaying and editing ratings (UI [🔝](#readme))
README
# StarryStars
StarryStars is iOS GUI library for displaying and editing ratings
## Features
StarryStars' ```RatingView``` is both ```IBDesignable``` and ```IBInspectable```You can change any of the following properties right in the interface builder:
![Properties](http://i.imgur.com/puU9Ypc.png)
And see the result right away:
![RatingView](http://i.imgur.com/r3bMqDT.png)
To add RatingView to your Storyboard/.xib file just drag a generic UIView from palette, then in "Custom Class" section of identity inspector set class to ```RatingView```
## Installation
### Carthage
- `cd` to your project folder
- `touch Cartfile` (if you don't have one yet)
- `nano Cartfile`
- put `github "peterprokop/StarryStars" == 2.0.0` into Cartfile
- Save it: `ctrl-x, y, enter`
- Run `carthage update`
- Copy framework from `Carthage/Build/iOS` to your project
- Make sure that framework is added in Embedded Binaries section of your target (or else you will get dyld library not loaded referenced from ... reason image not found error)
- Add `import StarryStars` on top of your view controller's code### Manual
Just clone and add ```StarryStars``` directory to your project.### Cocoapods
- Make sure that you use latest stable Cocoapods version: `pod --version`
- If not, update it: `sudo gem install cocoapods`
- `pod init` in you project root dir
- `nano Podfile`, add:```
pod 'StarryStars', '~> 2.0.0'
use_frameworks!
```
- Save it: `ctrl-x`, `y`, `enter`
- `pod update`
- Open generated `.xcworkspace`
- Don't forget to import StarryStars: `import StarryStars`!## Requirements
- iOS 10.0+
- Xcode 10.0+
- Swift 5.0 (for older versions, see `swift-2.2` branch)## Usage from code
Swift:
```
let rvRightToLeft = RatingView()rvRightToLeft.frame = view.bounds
view.addSubview(rvRightToLeft)
rvRightToLeft.editable = true
rvRightToLeft.delegate = self// RatingView will respect setting this property
rvRightToLeft.semanticContentAttribute = .forceRightToLeft
```Objective C:
```
RatingView* rvRightToLeft = [[RatingView alloc] init];rvRightToLeft.frame = self.view.bounds;
[self.view addSubview:rvRightToLeft];
rvRightToLeft.editable = YES;
rvRightToLeft.delegate = self;// RatingView will respect setting this property
rvRightToLeft.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
```## Other Projects
[SwiftOverlays](https://github.com/peterprokop/SwiftOverlays) - Swift GUI library for displaying various popups and notifications.