全局变量:
@interface UIViewController ()
{
NSIndexPath *_indexPath;
}
@end
1.首先添加手势:
- (void)loadView
{
[super loadView];
self.view = kAppBg;
self.view.backgroundColor = [UIColor whiteColor];
self.view.userInteractionEnabled = YES;
CGRect bounds = self.view.bounds;
_scroller = [[UIScrollView alloc] initWithFrame:CGRectZero];
_scroller.frame = CGRectMake(0.0, 0.0, bounds.size.width, ZYScreenHeight()+25.0);
_scroller.backgroundColor = [UIColor whiteColor];
_scroller.showsHorizontalScrollIndicator = NO;
_scroller.showsVerticalScrollIndicator = NO;
_realtimeBg = [[RealtimeBg alloc] init];
_realtimeBg.delegate = self;
_realtimeBg.image = [UIImage getMiddleStretchableImage:@"