Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add usage to readme

  • Loading branch information...
commit ed46bf36cf80a2f3ae156f9704389bade4a46c18 1 parent e33c974
@alexzielenski authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 README.markdown
View
11 README.markdown
@@ -6,6 +6,15 @@ ScrollToRefresh is a subclass of NSScrollView that adds a "pull-to-refresh" feel
![ScrollToRefresh in action](https://github.com/alexzielenski/ScrollToRefresh/raw/master/screenshot.png "Scroll To Refresh")
+Usage
+================
+
+1. Set the class of your scroll view to ```EQSTRScrollView```
+2. Set the `-refreshBlock` of your scroll view to a block to run some code when the refresh starts.
+3. When you know that your processing is finished, call `-stopLoading` on the scroll view to remove the refresh view.
+4. PROFIT
+
+
How it works
================
The secret is actually knowing how scroll views work. When you scroll, the clip view offsets the origin of its `-bounds` so any subview within the clipview will scroll. It also employs a couple of other methods to check the boundaries of the document view which I override to include the refresh view to get a more natural feel.
@@ -34,4 +43,4 @@ ScrollToRefresh is licensed under the MIT license meaning you can do whatever yo
// 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.
+ // THE SOFTWARE.
Please sign in to comment.
Something went wrong with that request. Please try again.