Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/izotx/JMCMarchingAnts
Example of adding marching ants selection to the edges of the image.
https://github.com/izotx/JMCMarchingAnts
Last synced: 6 days ago
JSON representation
Example of adding marching ants selection to the edges of the image.
- Host: GitHub
- URL: https://github.com/izotx/JMCMarchingAnts
- Owner: izotx
- License: gpl-3.0
- Created: 2015-11-02T20:39:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-17T23:09:53.000Z (over 2 years ago)
- Last Synced: 2024-08-15T17:57:59.181Z (4 months ago)
- Language: Swift
- Size: 554 KB
- Stars: 144
- Watchers: 4
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
- awesome-ios - JMCMarchingAnts - Library that lets you add marching ants (animated) selection to the edges of the images. (Media / Image)
- awesome-ios-star - JMCMarchingAnts - Library that lets you add marching ants (animated) selection to the edges of the images. (Media / Image)
README
# JMCMarchingAnts
Library that lets you add marching ants (animated) selection to the edges of the images.
![](https://raw.githubusercontent.com/izotx/JMCMarchingAnts/master/marchingAnts.gif)Usage:
* Copy the JMCMarchingAnts.swift file to your project
* Create an instance of the JMCMarchingAnts class:```
let marcher:JMCMarchingAnts = JMCMarchingAnts()
```
* Add animated selection layer with a addAnts(image:UIIMage, imageView:UIImageView) method, where image is an image that will be processed, and the imageView is a view that selection layer will be displayed on.
```
marcher.addAnts(image, imageView: self.imageView)
```Enjoy yur marching ants!
```Swift
class ViewController: UIViewController {
@IBOutlet weak var imageView: UIImageView!//Initialize the marching ants object
let marcher:JMCMarchingAnts = JMCMarchingAnts()
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
if let image = imageView.image{
//if image exists add the selection layer to the image view
marcher.addAnts(image, imageView: self.imageView)
}
}
}
```License
GNU General Public License V3Disclaimer
The image of the car was acquired from: http://icons.mysitemyway.com/legacy-icon/038420-glossy-black-icon-transport-travel-transportation-car9-sc44/