Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josejuanqm/ody
Random image generator built with Swift
https://github.com/josejuanqm/ody
Last synced: 16 days ago
JSON representation
Random image generator built with Swift
- Host: GitHub
- URL: https://github.com/josejuanqm/ody
- Owner: josejuanqm
- Created: 2016-01-03T19:28:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-16T02:44:39.000Z (over 7 years ago)
- Last Synced: 2024-10-13T14:44:16.467Z (about 1 month ago)
- Language: Objective-C
- Size: 192 KB
- Stars: 45
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ody
[![Version](https://img.shields.io/cocoapods/v/OdyiOS.svg?style=flat)](http://cocoapods.org/pods/OdyiOS)
[![License](https://img.shields.io/cocoapods/l/OdyiOS.svg?style=flat)](http://cocoapods.org/pods/OdyiOS)
[![Platform](https://img.shields.io/cocoapods/p/OdyiOS.svg?style=flat)](http://cocoapods.org/pods/OdyiOS)Ody is an easy to use random image generator built with Swift.
Perfect for placeholders!
Built with [Silo] [silojq], [LoremPixel] [images], and [FillDunphy] [filldunphy].
### Demo
---```swift
odytizeAll()
```![alt tag] (https://i.imgur.com/x4oC6we.png) ![alt tag] (https://i.imgur.com/xeLBKIY.gif)
### Version
---
1.1[changelog](https://github.com/josejuanqm/Ody#changelog)
### Installation
---Ody is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "OdyiOS"
```---or---
Download from [here] [dld]
- import the Swift FileJust drag and drop Ody.swift file into your project
## Usage
---#### If you are using AutoLayout please call after the view appears or in ViewDidAppear method
### From a UIImageView
```swift
imageView.odytizeGrayscale()
imageView.odytizeGrayscale(loaderColor: UIColor)
imageView.odytizeGrayscale(category: ImageCategory, text: String)
imageView.odytize()
imageView.odytize(loaderColor: UIColor)
imageView.odytize(category: ImageCategory)
imageView.odytize(grayscale: Bool, category: ImageCategory, text: String)
//To change loader color after odytizing
imageView.setLoaderColorForOdyView(UIColor)
```### From a UIView (Odytizes every UIImageView within the UIView)
```swift
view.odytizeAll()
view.odytizeAll(loaderColor: UIColor)
view.odytizeAll(grayscale: Bool, category: ImageCategory, text: String, loaderColor: UIColor)
view.odytizeAllToGrayscale()
view.odytizeAllToGrayscale(loaderColor: UIColor)
view.odytizeAllToGrayscale(category: ImageCategory)
view.odytizeAllWithCustomImage(url: String)
view.odytizeAllWithCustomImage(url: String, loaderColor: UIColor)
```### Instantiating a new UIImageView
```swift
UIImageView(loaderColor: UIColor, frame: CGRect)
UIImageView(category: ImageCategory, frame: CGRect)
UIImageView(loaderColor: UIColor, frame: CGRect, grayscale: Bool, category: ImageCategory, text: String)
```### ImageCategory Enum
| enum case | Example |
| :------------: |:---------------:|
| ``ImageCategory.Abstract`` | ![alt tag] (http://lorempixel.com/400/200/abstract) |
| ``ImageCategory.Animals`` | ![alt tag] (http://lorempixel.com/400/200/animals) |
| ``ImageCategory.Business`` | ![alt tag] (http://lorempixel.com/400/200/business) |
|``ImageCategory.Cats``| ![alt tag] (http://lorempixel.com/400/200/cats) |
|``ImageCategory.City``| ![alt tag] (http://lorempixel.com/400/200/city) |
|``ImageCategory.Food``| ![alt tag] (http://lorempixel.com/400/200/food)|
|``ImageCategory.Nightlife``| ![alt tag] (http://lorempixel.com/400/200/nightlife)|
|``ImageCategory.Fashion``| ![alt tag] (http://lorempixel.com/400/200/fashion)|
|``ImageCategory.People``| ![alt tag] (http://lorempixel.com/400/200/people)|
|``ImageCategory.Nature``| ![alt tag] (http://lorempixel.com/400/200/nature)|
|``ImageCategory.Sports``| ![alt tag] (http://lorempixel.com/400/200/sports)|
|``ImageCategory.Technics``| ![alt tag] (http://lorempixel.com/400/200/technics)|
|``ImageCategory.Transport``| ![alt tag] (http://lorempixel.com/400/200/transport)|
|``ImageCategory.FillDunphy`` (does not support grayscale) | ![alt tag] (http://filldunphy.com/400/200) |### Changelog
1.1* Added Support for CocoaPods
1.0
* Initial version
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)
[dld]:
[silojq]:
[images]:
[filldunphy]: