Skip to content

Instantly share code, notes, and snippets.

Lucas Paul L4grange

Block or report user

Report or block L4grange

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@L4grange
L4grange / FadeView.swift
Last active Apr 4, 2019
Fade a UIView in ios using Gradient (Swift Extension)
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
@L4grange
L4grange / GPIO.java
Last active Nov 24, 2018 — forked from rosterloh/gpio.java
Android class for GPIO control
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 {
You can’t perform that action at this time.