0
了滚动指示这是我的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