由于我升级了 iPad 操作系统,我的应用程序的 UITabBar 标题显示被截断,如屏幕截图所示。
我尝试了一些方法,但没有找到正确的解决方案。
希望可以有人帮帮我。
这是代码:
func setupTabBar() {
if #available(iOS 13, *) {
let appearance = tabBar.standardAppearance
appearance.configureWithOpaqueBackground()
appearance.backgroundImage = UIImage(color: .white)
appearance.shadowImage = UIImage(color: .clear)
let normalAttrs: [NSAttributedString.Key: Any] = [.foregroundColor: ThemeColor.gray]
let selectedAttrs: [NSAttributedString.Key: Any] = [.foregroundColor: ThemeColor.red]
appearance.stackedLayoutAppearance.selected.titleTextAttributes = selectedAttrs
appearance.stackedLayoutAppearance.normal.titleTextAttributes = normalAttrs
appearance.inlineLayoutAppearance.selected.titleTextAttributes = selectedAttrs
appearance.inlineLayoutAppearance.normal.titleTextAttributes = normalAttrs
appearance.compactInlineLayoutAppearance.selected.titleTextAttributes = selectedAttrs
appearance.compactInlineLayoutAppearance.normal.titleTextAttributes = normalAttrs
UITabBar.appearance().standardAppearance = appearance
} else {
tabBar.backgroundImage = UIImage(color: .white)
tabBar.shadowImage = UIImage(color: .clear)
}
if #available(iOS 15, *) …Run Code Online (Sandbox Code Playgroud) 两个数字比较,如下所示:
#!/usr/bin/ruby
a=1000, b=1000, c=1000, d=1000
puts a==b, c==d
Run Code Online (Sandbox Code Playgroud)
但打印:
false
true
Run Code Online (Sandbox Code Playgroud)
为什么Ruby比较这样的结果?
如何从拉取请求中获取 git 提交消息,可能该请求有多个提交,我怎样才能获取这些消息。我知道获取提交消息的命令git log,但我只想显示此拉取请求的相关提交记录。