Xcode 4 导航项提示属性行为异常? [英] Xcode 4 Navigation item prompt property misbehaving?

查看:24
本文介绍了Xcode 4 导航项提示属性行为异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Interface Builder 中进行设计并向提示属性添加文本时,它会创建一个额外的顶部标题.这带来了在导航栏中允许 2 个磁贴所需的额外厚度.

When designing in Interface Builder and you add text to a prompt property, it creates an additional top title. This comes with the extra thickness needed to allow for 2 tiles in the navigation bar.

一旦我删除了文本,假设重置回原来的样子,即使那里没有文本,它也会保持该厚度.在运行时切换视图会使条形变长和变小,这并不好.

Once I remove the text, let's say to reset back to the way it was, it keeps that thickness even though there is no text there. At runtime switching views makes the bar grow and shrink, which isnot nice.

我的问题是,您如何将其重置为默认的单线粗细条?

My question is, how do you reset this back to a default single line thickness bar?

谢谢吉姆

推荐答案

如果其他人遇到这个问题...2 个选项

In case anyone else has this problem...2 options

1 修复 xib direct 中未删除的 xml

1 Fix unremoved xml in xib direct

一种解决方法,如果这是一个错误,则编辑 *.xib 文件...作为 xml,您可以删除留下的条目,并且似乎可以毫无问题地重置...

A workaround, if this is a bug is to edit the *.xib file...as xml you can delete the entry left behind and seems to reset without issue...

例如可以肯定的是,添加像FOO BAR"这样的值并在文本编辑器中搜索以找到键.

e.g. To be sure, add value like "FOO BAR" and search for that in the text editor to find the key.

(采取通常的备份和照顾,当然自己承担风险)

(take usual backup & care & own risk ofcourse)

(提交在线bug给苹果评估)

(submitted online bug to apple for assessment)

Drew C 建议的 2 运行时程序修复即设置 self.navigationItem.prompt = nil

2 Runtime programatic fix suggested by Drew C i.e. set self.navigationItem.prompt = nil

这篇关于Xcode 4 导航项提示属性行为异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆