Latch
Easily use Passcode and Touch ID authentication! (Producthunt Hackathon)
Install / Use
/learn @BurlApps/LatchREADME
Latch
Hackathon: Producthunt Hackathon
Date: November 25, 2014
Placed: N/A
Coding Time: 12 hours
Team Members: 2
Description: Easily use Passcode and Touch ID authentication!
Install
-
Copy
Frameworkfolder into your project -
Change
Latch.LTPasscode.xibto<module>.LTPasscode.xib
Configure (Example)
- Create Latch in View Controller
self.latch = Latch()
self.latch.delegate = self // Make sure to add LatchDelegate to Class
self.latch.parentController = self
- Add Delegate Methods
func latchGranted() {
println("access granged")
}
func latchSet() {
println("passcode set")
}
func latchDenied(reason: LatchError) {
println(reason.hashValue)
}
- Customize Messages (Optional)
self.latch.touchReason = "We need to make sure it's you!"
self.latch.passcodeInstruction = "Enter Passcode"
- Customize Theme (Optional)
self.latch.passcodeTheme.logo = UIImage(named: "Logo")!
self.latch.passcodeTheme.logoTint = nil
self.latch.passcodeTheme.instructions = UIColor(red:0.96, green:0.33, blue:0.24, alpha:1)
//Passcode theme options
struct LTPasscodeTheme {
var logo: UIImage = UIImage(named: "Latch")!
var logoTint: UIColor! = UIColor(red:0.12, green:0.67, blue:0.95, alpha:1)
var logoErrorTint: UIColor = UIColor.redColor()
var instructions: UIColor = UIColor(red:0.01, green:0.66, blue:0.96, alpha:1)
var instructionsError: UIColor = UIColor.redColor()
var background: UIColor = UIColor.whiteColor()
var statusBar: LTPasscodeStatusBar = .Light
var keyPadBackground: UIColor = UIColor.whiteColor()
var keyPadBorder: UIColor = UIColor(red:0.01, green:0.66, blue:0.96, alpha:1)
var keyPadTouchBackground: UIColor = UIColor(red:0.01, green:0.66, blue:0.96, alpha:1)
var keyPadTouchBorder: UIColor = UIColor.whiteColor()
var bubbleBackground: UIColor = UIColor.whiteColor()
var bubbleColor: UIColor = UIColor(red:0.01, green:0.66, blue:0.96, alpha:1)
var bubbleActiveBackground: UIColor = UIColor(red:0.01, green:0.66, blue:0.96, alpha:1)
var bubbleActiveColor: UIColor = UIColor(red:0.01, green:0.66, blue:0.96, alpha:1)
var bubbleErrorBackground: UIColor = UIColor.redColor()
var bubbleErrorColor: UIColor = UIColor.redColor()
}
- Turn On/Off Touch ID & Passcode (Optional)
self.latch.enableTouch = true // True by default
self.latch.enablePasscode = true // True by default
Usage
Set Passcode: self.latch.updatePasscode()
Remove Passcode: self.latch.removePasscode()
Authorize User: self.latch.authorize()
Thanks for looking at our small docs. Please use carefully, this was built in less than 12 hours and is no where near perfect. Thanks:)
Related Skills
node-connect
340.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.1kCommit, push, and open a PR

