You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/CodeEditTextView/TextView/TextView+ScrollToVisible.swift
+24-9Lines changed: 24 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,15 @@ extension TextView {
37
37
}
38
38
}
39
39
40
-
publicfunc scrollToRange(_ range:NSRange){
40
+
41
+
/// Scrolls the view to the specified range.
42
+
///
43
+
/// - Parameters:
44
+
/// - range: The range to scroll to.
45
+
/// - center: A flag that determines if the range should be centered in the view. Defaults to `true`.
46
+
///
47
+
/// If `center` is `true`, the range will be centered in the visible area. If `center` is `false`, the range will be aligned at the top-left of the view.
0 commit comments