一个无限滚动的 NSScrollView
clip view 实现
一个纯 Swift 实现的 Helftone Infinite Scroll View (archive.org),支持 Swift Package Manager。
在 Demo
子文件夹中有一个基本的演示应用程序。
您的 scrollview 的 document view 必须实现 HTInfiniteClipViewContent
,它应该围绕可滚动区域内的可见区域重新配置视图内容。 有关如何执行此操作的示例,请参见 [演示实现](./Demo/HTInfiniteDocument Demo/HTInfiniteDocument Demo/HTInfiniteDocumentView.swift)。
原始实现的所有功劳都归于 Milen Dzhumerov 在 Helftone。
如果您花费任何时间将图形(如 UML 图)或任何类型的 ASCII 艺术放入您的代码注释中,请去购买 Monodraw!它使一项费力的任务变得容易得多。
MIT License
Created by Milen Dzhumerov on 31/03/2015.
Copyright (c) 2015 Helftone. All rights reserved.
Converted to Swift by Darren Ford 11/9/2023
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.