回答編集履歴
1
じcurrentIndex
answer
CHANGED
@@ -1,1 +1,7 @@
|
|
1
|
-
現在のindexって`currentIndex`じゃないんでしょうか?
|
1
|
+
現在のindexって`currentIndex`じゃないんでしょうか?
|
2
|
+
|
3
|
+
```swift
|
4
|
+
if let viewController = tc.viewControllers!.first {
|
5
|
+
let currentIndex = tc.tabItems.map{ $0.viewController }.indexOf(viewController)
|
6
|
+
}
|
7
|
+
```
|