Swiftpack.co - EnesKaraosman/DesignDetective as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by EnesKaraosman.
EnesKaraosman/DesignDetective 1.0.1
Compare your implementation and design, see how much they match!
⭐️ 41
🕓 1 year ago
iOS
.package(url: "https://github.com/EnesKaraosman/DesignDetective.git", from: "1.0.1")

DesignDetective

Preview

Usage

You may trigger anywhere, but I personally prefer using it via Shake Gesture

import DesignDetective

extension UIWindow {
    open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
        #if DEBUG
        if motion == .motionShake {
            if DesignDetective.shared.isActive {
                DesignDetective.shared.deActivate()
            } else {
                try? DesignDetective.shared.activate()
            }
        }
        #endif
    }
}

Our Detective grabs the most top view controller's view's snapshot (image), and presents a screen (including image) above actual screen.

Accepts you to load image (via a URL), after you paste a url to your clipboard, you should be ready to go.

Or alternatively you can select an image from your photo album. (You can drag drop an image to the simulator)

To activate the detective, shake simulator/device ( for simulator => menu Device > Shake or via shortcut Ctrl + CMD + Z )

Reset Selected Image

  • Double tap the selected Image

GitHub

link
Stars: 41
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics