目前,我有一个带有 X UIView 作为页面的 UIScrollView。我想知道是否有办法获取当前显示的 UIView?
mScroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
mScroll.pagingEnabled = YES;
NSInteger numberOfViews = 3;
for (int i = 0; i < numberOfViews; i++) {
CGFloat yOrigin = i * self.view.frame.size.width;
MyICalView* awesomeView=[[MyICalView alloc] initWithFrame:CGRectMake(yOrigin, 0, self.view.frame.size.width, self.view.frame.size.height)];
[mScroll addSubview:awesomeView];
[awesomeView release];
}
mScroll.contentSize = CGSizeMake(self.view.frame.size.width * numberOfViews, self.view.frame.size.height);
mScroll.delegate=self;
有什么方法可以获取当前显示的awesomeView?