更改 Three20 navigationBarTintColor 导致图像库 ThumbView 顶部出现间隙
我在我的应用程序中实现了 Three20 图片库。我想更改图像库屏幕顶部导航栏的颜色。我进入 TTThumbsViewController.m 并找到以下行:
self.statusBarStyle = UIStatusBarStyleDefault;
self.navigationBarStyle = UIBarStyleDefault;
如果我更改这些值,导航栏的颜色/样式会发生变化,但导航栏和第一行图像之间会出现间隙。该间隙的高度看起来比导航栏大,但比第一行缩略图短。
我已经实现了 Three20 样式表,但这并没有解决问题。
I have implemented a Three20 Image Gallery into my App. I want to change the color of the Navigation Bar at the top of the Image Gallery Screen. I have gone into TTThumbsViewController.m and found the lines that read:
self.statusBarStyle = UIStatusBarStyleDefault;
self.navigationBarStyle = UIBarStyleDefault;
If I change these values, the color / style of the Navigation Bar changes, but a gap appears between the Navigation Bar and the first row of images. The gap looks to have a height larger than than the Navigation Bar but shorter than the first row of thumbnails.
I have implemented a Three20 Stylesheet but that has not resolved the issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在我的应用程序中,在我使用 TTThumbsViewController 的文件中,我将此方法添加到 .m 文件中,它解决了间隙问题:
我现在可以将导航栏颜色更改为我想要的任何颜色,并且导航栏/表格间距是正确的。
In my App, in the file where I am using TTThumbsViewController, I added this method to the .m file and it fixed the gap issue:
I am now able to change the navbar color to whatever I wish and the navbar / table spacing is correct.
正如qui前一段时间所说,我也遇到了同样的问题。就我而言,我已经为 Three20 的 TTThumbsViewController 创建了一个类别,当我尝试重写 updateTableLayout 方法时什么也没有发生,所以我尝试将相同的代码放入另一个方法 - viewWillAppear - 并且它起作用了。
我在这里注册它只是为了帮助其他人。感谢克里斯的初步回答。
As qui talked some time ago, I had the same problem. In my case I have created a category to the Three20's TTThumbsViewController and when I tried to override the updateTableLayout method nothing happened, so I tried to put the same code into another method - the viewWillAppear - and it worked.
I'm registering it here just in case to help others. And thanks Chris by your initial answer.