xcode 导航项中不支持 Swift 纯样式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31729385/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:35:24  来源:igfitidea点击:

Swift plain style unsupported in a navigation item

iosobjective-ciphonexcodeswift

提问by Kiwo Tew

I am trying to animate my menu icon to when a user taps on the hamburger icon it will animate into a close icon.

我试图将我的菜单图标动画化,当用户点击汉堡包图标时,它将动画化为关闭图标。

So inside my navigation item I have a normal Bar button Itemand inside that I have a UIViewthat I later animate.

所以在我的导航项中,我有一个普通的Bar 按钮 Item,在里面我有一个UIView,我稍后会对其进行动画处理。

But soon as I place the view inside the bar button item I get the warning: plain style unsupported in a navigation item

但是一旦我将视图放在栏按钮项中,我就会收到警告: 导航项中不支持纯样式

Everything still works fine but how can I fix this?

一切仍然正常,但我该如何解决这个问题?

I have seen other apps doing it like I do. eg: this one

我已经看到其他应用程序像我一样这样做。例如:这个

Thanks

谢谢

回答by Kiwo Tew

So I found a solution.

所以我找到了一个解决方案。

If you set the bar button itemto style > "bordered" the warning goes a away

如果您将条形按钮项设置为 style > “bordered”,警告就会消失