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
| import Foundation | |
| /// A class that keeps a weakly reference for `self` when implementing `onXXX` behaviors. | |
| /// Instead of remembering to keep `self` as weak in a stored closure: | |
| /// | |
| /// ```swift | |
| /// // MyClass.swift | |
| /// var onDone: (() -> Void)? | |
| /// func done() { | |
| /// onDone?() |
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 { | |
| @objc | |
| func clickButton() { | |
| //get the button frame | |
| /* 1 */ | |
| let button = UIButton.init(frame: CGRect(x: 100, y: 100, width: 100, height: 100)) | |
| /* 2 */ | |
| //Configure the presentation controller | |
| let popoverContentController = BViewController() |
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
| import Foundation | |
| /// A class that keeps a weakly reference for `self` when implementing `onXXX` behaviors. | |
| /// Instead of remembering to keep `self` as weak in a stored closure: | |
| /// | |
| /// ```swift | |
| /// // MyClass.swift | |
| /// var onDone: (() -> Void)? | |
| /// func done() { | |
| /// onDone?() |
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
| git init # 初始化本地git仓库(创建新仓库) | |
| git config --global user.name "xxx" # 配置用户名 | |
| git config --global user.email "xxx@xxx.com" # 配置邮件 | |
| git config --global color.ui true # git status等命令自动着色 | |
| git config --global color.status auto | |
| git config --global color.diff auto | |
| git config --global color.branch auto | |
| git config --global color.interactive auto | |
| git config --global --unset http.proxy # remove proxy configuration on git | |
| git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库 |
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
| # luna_pinyin.custom.yaml | |
| # | |
| # 在【朙月拼音】裏使用Emoji表情 | |
| # | |
| # 保存到Rime用戶文件夾後,重新部署生效 | |
| # ~/.config/ibus/rime (linux) | |
| # ~/Library/Rime (macos) | |
| # %APPDATA%\Rime (windows) | |
| # | |
| # 如果目標文件已經包含其他修改內容,只需按照縮進合併 patch: 以下的部分 |