//
//  SSView.m
//  SVInSVDemo
//
//  Created by loufq on 12-4-27.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "SSView.h"


//Horizontal and vertical

@implementation SSView

@synthesize dsOri,curIndexPath;

- (void)dealloc {
    
}

+(id)createWithFrame:(CGRect)frame ds:(NSArray*)ds{
    SSView* v =[[self alloc] initWithFrame:frame ds:ds];
    return v;
}


-(void)setCurIndexPath:(NSIndexPath *)aCurIndexPath{
    if (_svHorizontal == nil) {
        return;
    }
    curIndexPath = aCurIndexPath;
    _svHorizontal.curIndexPath = self.curIndexPath;
}


-(id)initWithFrame:(CGRect)frame ds:(NSArray*)ds{
    self = [super initWithFrame:frame];
    if (self) {
        SHorizontalView* shv =[[SHorizontalView alloc] initWithFrame:frame];
        _svHorizontal = shv;
        shv.ds = ds;
        shv.delegate = self;
        [self addSubview:shv];
    }
    return self;
}

- (void)kwm_getSHorizontalViewCurrnetPage:(NSInteger)currentPage{
    NSLog(@"SSView");
    if (self.delegate != nil) {
        [self.delegate kwm_getSSViewCurrentPage:currentPage];
    }
}

@end