Files
DIYgodandClaude Opus 5.5 cff92214c6 fix(mobile): switch the tab bar and relative times with the language
After a language switch the native iOS tab bar kept its old labels, since
only the first title reached the tab bar item, and times on screen mixed
languages ("2 years前"). Later titles now reach the item, the dayjs locale
switches before the language, and relative times re-format on the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 00:48:32 +08:00

29 lines
603 B
Swift

//
// TabScreenView.swift
// FollowNative
//
// Created by Innei on 2025/3/16.
//
import ExpoModulesCore
import UIKit
class TabScreenView: ExpoView {
weak var ownerViewController: UIViewController?
var icon: String?
var activeIcon: String?
var title: String? {
didSet {
// The tab bar item copies the title once, when the tab is inserted, so a later title, e.g.
// after a language switch, has to be passed on here
ownerViewController?.tabBarItem.title = title
}
}
required init(appContext: AppContext? = nil) {
super.init(appContext: appContext)
}
}