-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
45 lines (27 loc) · 2.34 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
JLNFadingScrollView
Written by Joshua Nozzi
http://joshua.nozzi.name
========================
What is JLNFadingScrollView?
----------------------------
JLNFadingScrollView is a drop-in subclass of NSScrollView that adds a top and bottom fade of scrolled content (a la Dictionary.app's left-hand term source list). You can configure its fade color (usually a gray/black for shadow or the scroll view's background color for 'fade-to-nothing') and the fade height (small for shadow look, very large for iPhone-style-rolling-wheel effect).
What platforms does it support?
-------------------------------
Requires 10.5 and up, because that's when NSGradient was introduced. You could use other gradient techniques to support older OS versions but really ... why bother?
What are the licensing requirements?
------------------------------------
See the license document (License.txt) that is included with the source code. It is free to use but requires attribution. Feel free to contact me at [email protected] with any licensing questions.
How do I use it in my project?
------------------------------
1 - Copy JLNFadingScrollView.m and JLNFadingScrollView.h into your project.
2 - In Interface Builder, set the class name of the desired NSScrollView to JLNFadingScrollView.
3 - Include JLNFadingScrollView.h into any file in which you want to communicate with the scroll view (to configure its fade color/height).
4 - Call -setFadeColor: and/or -setFadeHeight: to configure to taste.
What else do I need to know?
----------------------------
1 - This subclass does not get along with NSClipView's copy-on-scroll behavior and sets it to NO. If you turn it back on, you'll get drawing artifacts.
2 - The top fade cannot be seen when table/outline column headers are enabled. It would look weird anyway...
3 - The fades auto-adjust their size depending on the chosen border type. Overridden border drawing or newly added border types may not adjust correctly.
How can I reach you?
--------------------
You can e-mail me at [email protected]. I'm happy to answer most questions about this source code but am not willing to "hold your hand" or debug your code. It's straightforward to use if you are familiar with Cocoa and take a few moments to study the source. Please do your homework first. Questions sent to me that make it obvious the sender didn't do their homework will be ignored.