move model update
This commit is contained in:
parent
05bf9cf5ac
commit
df980722fd
@ -75,6 +75,7 @@ import Foundation
|
||||
|
||||
// MARK: - UITabBarDelegate
|
||||
public func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
|
||||
self.model.selectedTab = item.tag
|
||||
Button.performButtonAction(with: model.tabs[item.tag].action, button: item, delegateObject: delegateObject, additionalData: nil)
|
||||
}
|
||||
|
||||
@ -90,7 +91,6 @@ import Foundation
|
||||
public func selectTab(at index: Int) {
|
||||
MVMCoreDispatchUtility.performBlock(onMainThread: {
|
||||
guard let newSelectedItem = self.items?[index] else { return }
|
||||
self.model.selectedTab = index
|
||||
self.selectedItem = newSelectedItem
|
||||
self.tabBar(self, didSelect: newSelectedItem)
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user