1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// 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