//
//  ViewController.m
//  Demo
//
//  Created by FineexMac on 16/3/7.
//  Copyright 漏 2016骞?iOS_LiuLiuLiu. All rights reserved.
//
//  浣滆€匞itHub涓婚〉 https://github.com/SwiftLiu
//  浣滆€呴偖绠?1062014109@qq.com
//  涓嬭浇閾炬帴 https://github.com/SwiftLiu/LPRefresh.git

#import "ViewController.h"
#import "LPRefresh.h"

@interface ViewController ()
{
    __weak IBOutlet UIView *line;
    __weak IBOutlet UIScrollView *scollView;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationController.navigationBar.translucent = NO;
}

- (void)viewDidAppear:(BOOL)animated
{
    line.frame = CGRectMake(0, 0, 600, 0.5);
    scollView.contentSize = CGSizeMake(scollView.bounds.size.width, scollView.bounds.size.height+1);
    
    //娣诲姞鍒锋柊鎺т欢
    [scollView addRefreshWithBlock:^{
        NSLog(@"LPRefresh寮€濮嬪埛鏂?);
    }];
}


- (IBAction)success:(id)sender {
    //鍒锋柊鎴愬姛
    [scollView endRefreshingSuccess];
}

- (IBAction)fail:(id)sender {
    //鍒锋柊澶辫触
    [scollView endRefreshingFail];
}


@end
// 鐗堟潈灞炰簬鍘熶綔鑰?// http://code4app.com (cn) http://code4app.net (en)
// 鍙戝竷浠g爜浜庢渶涓撲笟鐨勬簮鐮佸垎浜綉绔? Code4App.com