不能显示在滚动视图
问题描述:
了滚动指示这是我的ViewController:不能显示在滚动视图
- (void)viewDidLoad
{
[super viewDidLoad];
self.imageView.image = self.image;
self.scrollView.contentSize = self.imageView.image.size;
self.imageView.frame = CGRectMake(0, 0, self.imageView.image.size.width, self.imageView.image.size.height);
self.title = [self.photo objectForKey:FLICKR_PHOTO_TITLE];
self.scrollView.delegate = self;
}
- (void)viewDidAppear:(BOOL)animated
{
[self.scrollView flashScrollIndicators];
self.scrollView.showsHorizontalScrollIndicator = YES;
}
但它并没有显示任何东西。 我已经在这里签出了几个相同的问题并尝试了所有可能的解决方案,但都没有成功。
答
我知道这是一个古老的线程,但我碰到它所以...
当含量大于滚动视图更大水平或垂直滚动视图指标只能说明。所以如果你的完整图像已经显示,那么没有指标。
您是否将其添加到视图中? [self.view addsubview:self.scrollview]? – 2012-07-05 08:55:55
我已经尝试[self.view addsubview:self.scrollview]但没有工作。 – Pan 2012-07-05 09:05:29
Arya:你的意思是这个:self.scrollView.contentSize = self.imageView.image.size;我在上面添加它。 – Pan 2012-07-05 09:06:06