This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"3.0.3" : "https://www.gstatic.com/cpdc/8f4d85570fdd4ab9-Google-3.0.3.tar.gz" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DoTaskClass { | |
let identifier: String | |
init(identifier: String) { | |
self.identifier = identifier | |
} | |
func getTask() -> (() -> ()) { | |
return { [weak self] in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compile Swift Module 'ExampleProject' (1 sources) | |
Linking ./.build/x86_64-unknown-linux/release/ExampleProject | |
/usr/bin/ld.gold: Opened new descriptor 3 for "//usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/Scrt1.o" | |
/usr/bin/ld.gold: Attempt to open //usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/Scrt1.o succeeded | |
/usr/bin/ld.gold: Unlocking file "//usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/Scrt1.o" | |
/usr/bin/ld.gold: Released descriptor 3 for "//usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/Scrt1.o" | |
/usr/bin/ld.gold: Opened new descriptor 7 for "//usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o" | |
/usr/bin/ld.gold: Attempt to open //usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o succeeded | |
/usr/bin/ld.gold: Unlocking file "//usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o" | |
/usr/bin/ld.gold: Released descriptor 7 for "//usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 2 ]; then | |
echo "format: git_cleanup <repo name> [-x/--expunge <directory 1> -l/--keeplatest <directory 2> ...]" | |
exit | |
fi | |
PROJ="$1" | |
shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIResponder.keyboardWillShowNotification | |
UIResponder.keyboardDidShowNotification | |
UIResponder.keyboardWillHideNotification | |
UIResponder.keyboardDidHideNotification |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIKeyboardAnimationCurveUserInfoKey: 7 | |
UIKeyboardAnimationDurationUserInfoKey: 0.25 | |
UIKeyboardBoundsUserInfoKey: NSRect: {{0, 0}, {820, 337}} | |
UIKeyboardCenterBeginUserInfoKey: NSPoint: {410, 1319.5} | |
UIKeyboardCenterEndUserInfoKey: NSPoint: {410, 1011.5} | |
UIKeyboardFrameBeginUserInfoKey: NSRect: {{0, 1180}, {820, 279}} | |
UIKeyboardFrameEndUserInfoKey: NSRect: {{0, 843}, {820, 337}} | |
UIKeyboardIsLocalUserInfoKey: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController { | |
//Register for notification ... | |
private func addjustSafeAreaTo(keyboardFrame: CGRect) { | |
view.safeAreaInsets.bottom = keyboardFrame.height | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class KeyboardAppearListener { | |
private var showKeyboard: NotificationToken? | |
private var hideKeyboard: NotificationToken? | |
private weak var viewController: UIViewController? | |
init( | |
_ viewController: UIViewController, | |
notificationCenter: NotificationCenter = .default) { | |
self.viewController = viewController | |
showKeyboard = notificationCenter.observe( | |
name: UIResponder.keyboardWillShowNotification) { [weak self] (notification) in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard | |
let viewController = viewController, | |
let userInfo = notification.userInfo, | |
let beginKeyboardFrame = userInfo[UIResponder.keyboardFrameBeginUserInfoKey] as? CGRect, | |
let endKeyboardFrame = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect, | |
endKeyboardFrame != beginKeyboardFrame | |
else { | |
return | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewController.additionalSafeAreaInsets.bottom += beginKeyboardFrame.origin.y - endKeyboardFrame.origin.y |
OlderNewer