Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b2f51d140 | |||
| d6e75eaede | |||
| 945e71dfa7 |
@@ -188,7 +188,8 @@ final class WordDetailViewController: UIViewController {
|
|||||||
|
|
||||||
private func searchMeaning() {
|
private func searchMeaning() {
|
||||||
Haptics.selection()
|
Haptics.selection()
|
||||||
guard let query = word.meaning.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
|
let text = "\(word.meaning) 是什么意思"
|
||||||
|
guard let query = text.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
|
||||||
let url = URL(string: "https://www.google.com/search?q=\(query)") else { return }
|
let url = URL(string: "https://www.google.com/search?q=\(query)") else { return }
|
||||||
present(SFSafariViewController(url: url), animated: true)
|
present(SFSafariViewController(url: url), animated: true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user