質問編集履歴
2
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -79,4 +79,15 @@
|
|
79
79
|
実際の画面
|
80
80
|

|
81
81
|
|
82
|
-
よろしくお願いします!
|
82
|
+
よろしくお願いします!
|
83
|
+
|
84
|
+
|
85
|
+
### 追記
|
86
|
+
|
87
|
+

|
88
|
+
|
89
|
+
ずっと黒・グレイでitemが表示されていたので、tintColorが悪さしてるんじゃないかと思って色々調べていたらライブラリの初期値が黒とグレイでした、、
|
90
|
+
このデフォルト値をOverrideでnilに出来ますでしょうか?
|
91
|
+
自分がやったこととしてはtintColorDidChange()を使って変更しようとしてもnilが渡せませんでした。
|
92
|
+
|
93
|
+
上記が関係しているかは、分かりませんがどんな意見でもいいのでご教授いただければと思います。
|
1
情報修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,51 +33,44 @@
|
|
33
33
|
|
34
34
|
}
|
35
35
|
|
36
|
-
|
36
|
+
func viewDidLoadNavigation() {
|
37
37
|
|
38
|
-
|
38
|
+
let size = bottomNavBar.sizeThatFits(view.bounds.size)
|
39
39
|
|
40
|
-
if let image = registerIcon {
|
41
|
-
let renderedImage = image.withRenderingMode(.alwaysOriginal)
|
42
|
-
|
43
|
-
let size = bottomNavBar.sizeThatFits(view.bounds.size)
|
44
|
-
|
45
|
-
|
40
|
+
let bottomNavBarFrame = CGRect(x: 0,y: view.bounds.height - size.height,width: size.width,height: size.height)
|
46
|
-
|
41
|
+
|
47
|
-
|
42
|
+
bottomNavBar.frame = bottomNavBarFrame
|
48
|
-
|
43
|
+
|
49
|
-
|
44
|
+
let homeItem = UITabBarItem(
|
50
|
-
|
45
|
+
title: "Home",
|
51
|
-
|
46
|
+
image: UIImage(icon: .googleMaterialDesign(.home), size: CGSize(width: 40, height: 40)),
|
52
|
-
|
47
|
+
tag: 0)
|
53
|
-
|
48
|
+
let messagesItem = UITabBarItem(
|
54
|
-
|
49
|
+
title: "問題の画像",
|
55
|
-
|
50
|
+
image: UIImage(named: "register_icon")?.withRenderingMode(.alwaysOriginal),
|
56
|
-
|
51
|
+
tag: 1)
|
57
|
-
|
52
|
+
messagesItem.badgeValue = "8"
|
58
|
-
|
53
|
+
let favoritesItem = UITabBarItem(
|
59
|
-
|
54
|
+
title: "Favorites",
|
60
|
-
|
55
|
+
image: UIImage(icon: .fontAwesome(.starO), size: CGSize(width: 40, height: 40)),
|
61
|
-
|
56
|
+
tag: 2)
|
62
|
-
|
57
|
+
favoritesItem.badgeValue = ""
|
63
|
-
|
58
|
+
let readerItem = UITabBarItem(
|
64
|
-
|
59
|
+
title: "Reader",
|
65
|
-
|
60
|
+
image: UIImage(icon: .fontAwesome(.signIn), size: CGSize(width:40, height: 40)),
|
66
|
-
|
61
|
+
tag: 3)
|
67
|
-
|
62
|
+
readerItem.badgeValue = "88"
|
68
63
|
|
69
|
-
|
64
|
+
let birthdayItem = UITabBarItem(
|
70
|
-
|
65
|
+
title: "ic_birthday",
|
71
|
-
|
66
|
+
image: UIImage(icon: .googleMaterialDesign(.accountCircle), size: CGSize(width:40, height: 40)),
|
72
|
-
|
67
|
+
tag: 4)
|
73
|
-
|
68
|
+
birthdayItem.badgeValue = "888+"
|
74
|
-
|
69
|
+
bottomNavBar.items = [homeItem, messagesItem, favoritesItem, readerItem, birthdayItem]
|
75
|
-
|
70
|
+
bottomNavBar.selectedItem = homeItem
|
76
|
-
|
77
|
-
view.addSubview(bottomNavBar)
|
78
|
-
}
|
79
71
|
|
80
|
-
|
72
|
+
view.addSubview(bottomNavBar)
|
73
|
+
|
81
74
|
}
|
82
75
|
|
83
76
|
|