【发布时间】:2010-09-20 06:21:18
【问题描述】:
我正在构建一种幻灯片放映,其中用户通过启用分页的滚动视图自己滑过图像。我有一个纵向视图控制器和一个横向视图控制器。纵向视图控制器与“scrollViewDidEndDecelerating”功能正常工作,但我在横向视图控制器上做了同样的事情,它没有响应。
- (void)viewDidLoad {
[super viewDidLoad];
imageNamesArray = [[NSMutableArray alloc] initWithCapacity:LNumImages];
int x = 0;
for(x=0; x<LNumImages;x++) {
[imageNamesArray insertObject: [NSString stringWithFormat:@"kr_Page_%d.png",x+1] atIndex:x];
}
LScrollView.delegate = self;
LScrollView.pagingEnabled = YES;
LScrollView.showsHorizontalScrollIndicator = YES;
LScrollView.contentSize = CGSizeMake(LScrollWidth * LNumImages, LScrollHeight);
[self initImages:0];
}
- (void)LScrollViewDidEndDecelerating:(UIScrollView *)LScrollView {
NSLog(@"stopped");
//does not get called
//[self arangeImages];
}
【问题讨论】:
标签: iphone