-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 经过实践,在候选窗口中调用inputController的方法获取候选词(candidates)和原始字符串(originalString)会在一些情况下返回为空,所以最好的方案是inputController主动把需要的数据传给候选窗口 2. 实践再次证明,不要试图去重写(override)的现有方法实现功能,比如说commitComposedString, 调用时机不能控制,系统在某些情况下会自动调用,难搞。所以推荐能用自定义方法的就写自定义方法 3. 实践又一次证明,最好把originalString通过setMarkedText方法进行上屏处理,否则在一些输入框中会有异常问题 4. 经过各种实践,在Xcode的文件上方输入搜索时,会在每次输入时,把markedText直接插入到输入框中,这个问题可以通过设置inputController.mark(for:)的for参数为kTSMHiliteSelectedConvertedText解决,但是markedText的样式会表现为选择样式,所以本次提交暂不处理这个问题,后续再观察一下
- Loading branch information
qwertyyb
committed
Aug 16, 2020
1 parent
6f35b21
commit 31a71af
Showing
16 changed files
with
361 additions
and
388 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
disabled_rules: # 禁用指定的规则 | ||
- identifier_name | ||
- block_based_kvo |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.