UIScrollView实现
#import <UIKit/UIKit.h>
@interface XViewController : UIViewController
@end
#import "XViewController.h"
@interface XViewController ()<UIScrollViewDelegate>
@property (nonatomic,strong) UIScrollView *scrollView;
@property (nonatomic) NSInteger height;
@property (nonatomic) NSInteger beginY;
@property (nonatomic) BOOL isBeginScroll;
@property (nonatomic) BOOL isBeginAnimationScroll;
@property (nonatomic) BOOL isXiangHuaDong;
@end
@implementation XViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = UIColor.blackColor;
_scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
_scrollView.delegate = self;
[_scrollView setContentSize:CGSizeMake(self.view.frame.size.width, self.view.frame.size.height * 2.0)];
[self loadResouses:0.0];
[self.view addSubview:_scrollView];