Instantly share code, notes, and snippets.

View android-screenshot.sh
$ adb shell screencap -p /sdcard/screencap.png
$ adb pull /sdcard/screencap.png /Users/pippo/Desktop/test.png
View android tap
$ adb shell input tap x y
View screen.sh
$ /usr/sbin/screencapture
-r
-l$(osascript -e 'tell app "QuickTime Player" to id of window 1')
/Users/pippo/Desktop/test.png
View voiceOver
//
// VoiceOverVC.swift
// Created by Pasca Alberto, IT on 10/08/18.
// Copyright © 2018 albertopasca.it. All rights reserved.
//
import UIKit
class VoiceOverVC: UIViewController {
View lowpower
//
// LowPowerVC.swift
// Created by Pasca Alberto, IT on 10/08/18.
// Copyright © 2018 albertopasca.it. All rights reserved.
//
import UIKit
class LowPowerVC: UIViewController {
View pasteboard
//
// PasteboardVC.swift
// Created by Pasca Alberto, IT on 10/08/18.
// Copyright © 2018 albertopasca.it. All rights reserved.
//
import UIKit
class PasteboardVC: UIViewController {
View proximity
//
// ProximityVC.swift
// Created by Pasca Alberto, IT on 10/08/18.
// Copyright © 2018 albertopasca.it. All rights reserved.
//
import UIKit
class ProximityVC: UIViewController {
View fontsize.swift
//
// FontSizeVC.swift
// Created by Pasca Alberto, IT on 10/08/18.
// Copyright © 2018 albertopasca.it. All rights reserved.
//
import UIKit
class FontSizeVC: UIViewController {
View shake
override func motionEnded(_ motion: UIEventSubtype, with event: UIEvent?) {
if motion == .motionShake {
if (<#textField#>.undoManager?.canUndo)! {
self.<#textField#>.undoManager?.undo()
}
}
}
View Brightness
import UIKit
class BrightnessVC: UIViewController {
var timer: Timer?
override func viewDidLoad() {
super.viewDidLoad()
timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { (t) in