View FadeView.swift
/// | |
/// With this extension you can call .fadeView(style: ) on any view to create a fading effect. | |
/// Very useful when trying to fade a UIScrollView, UITableView or UICollectionView | |
/// This way also takes care of the "white or black" transparent gradient that happens as described here: https://stackoverflow.com/questions/24882361/ios-white-to-transparent-gradient-layer-is-gray | |
/// This solution is a swift implementation of the following stackoverflow question in Swift, adding more styles: https://stackoverflow.com/questions/17774761/how-to-create-a-top-fade-effect-using-uiscrollview/25408833#25408833 | |
/// | |
extension UIView { | |
enum UIViewFadeStyle { | |
case bottom |
View GPIO.java
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
/** | |
This class allows you to control GPIO pins form android, by abstracting the command line excecution into a java class. | |
IMPORTANT NOTE: Requires root to run, since it is required to write to GPIO ports in /sys/class/gpio/ | |
*/ | |
public class GPIO { |