あとでちゃんと書き直す
if let textView = self.textView, let textRange = textView.selectedTextRange{
let caretRect = textView.caretRect(for: textRange.end)
//これ
let caretRectInWindow = textView.convert(caretRect, to: nil)
}
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 5 years have passed since last update.
あとでちゃんと書き直す
if let textView = self.textView, let textRange = textView.selectedTextRange{
let caretRect = textView.caretRect(for: textRange.end)
//これ
let caretRectInWindow = textView.convert(caretRect, to: nil)
}
Register as a new user and use Qiita more conveniently
Go to list of users who liked