2011-11-09 52 views
0

我正在使用TTPhotoViewController在照片查看器中显示图像。更改TTPhotoViewController UI

我试图改变用户界面,并删除导航栏中的“查看所有”按钮,但我没有成功做到这一点。

回答

0

是的,我试图自己做,覆盖视图方法和设置导航栏不起作用。

如果删除了负责在TTPhotoViewController.m代码就会然而工作:

if (_photoSource.numberOfPhotos > 1) { 
    self.navigationItem.rightBarButtonItem = 
    [[[UIBarButtonItem alloc] initWithTitle:TTLocalizedString(@"See All", 
                  @"See all photo thumbnails") 
            style:UIBarButtonItemStyleBordered 
            target:self 
            action:@selector(showThumbnails)] 
    autorelease]; 

} else { 
    self.navigationItem.rightBarButtonItem = nil; 
}