Skip to content

Commit

Permalink
Merge branch 'release/0.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
leilee committed Sep 28, 2016
2 parents b3b0d66 + b17cf87 commit 64b5d2e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions PassLock/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ extension PassLockType {

var passwordInputTitle: String {
switch self {
case .SetPassword, .Unlock: return "请输入密码"
case .ChangePassword, .RemovePassword: return "请输入旧密码"
case .SetPassword, .RemovePassword, .Unlock: return "请输入密码"
case .ChangePassword: return "请输入旧密码"
}
}

Expand Down
2 changes: 1 addition & 1 deletion PassLock/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.3</string>
<string>0.1.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
13 changes: 13 additions & 0 deletions PassLock/PassLockViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ public class PassLockViewController: UIViewController {
queue: NSOperationQueue.mainQueue()) { [weak self] _ in
self?.dismiss(animated: false, completion: nil)
}

NSNotificationCenter.defaultCenter().addObserverForName(UIApplicationDidBecomeActiveNotification,
object: nil,
queue: NSOperationQueue.mainQueue()) { [weak self] _ in
self?.passwordInputView.becomeFirstResponder()
}
}

public override func viewWillAppear(animated: Bool) {
Expand Down Expand Up @@ -158,6 +164,13 @@ extension PassLockViewController {
descriptionLabel.hidden = true

navigationItem.title = config.passLockType.title

let tapGesture = UITapGestureRecognizer(target: self, action: #selector(PassLockViewController.backgroundTapped))
view.addGestureRecognizer(tapGesture)
}

@objc private func backgroundTapped() {
passwordInputView.becomeFirstResponder()
}

}

0 comments on commit 64b5d2e

Please sign in to comment.