ios - 大标题,居中对齐
<p><p>我尝试在大标题模式下将标题居中,但该代码不影响。在 AppDelegate 中:</p>
<pre><code>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: ?) -> Bool {
// Override point for customization after application launch.
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.alignment = .center
UINavigationBar.appearance().largeTitleTextAttributes =
return true
}
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>大标题不能居中,它的位置在左边并且左对齐。标题的大小无关紧要,如果您希望标题居中,则必须创建自己的自定义标题。</p></p>
<p style="font-size: 20px;">关于ios - 大标题,居中对齐,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/48729077/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/48729077/
</a>
</p>
页:
[1]