{
"$type": "site.standard.document",
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreiddjjtvcidk2msaw2hhn3r6w7heespdw755wgez22zu4qncw4srmq"
},
"mimeType": "image/webp",
"size": 23946
},
"description": "iOS 26.1 introduced an infuriating change to the tabViewBottomAccessory behaviour that is fixed in iOS 26.2.",
"path": "/2025-11-07-changes-to-tabviewbottomaccessory-in-ios-26-1/",
"publishedAt": "2025-11-07T00:16:21.000Z",
"site": "at://did:plc:ex23caczr45rodrfcxrwps6h/site.standard.publication/self",
"tags": [
"code",
"singapore-buses"
],
"textContent": "[Update 09 Nov 2025: there's new API in iOS 26.2 that allows you to hide the tabViewBottomAccessory. See the bottom of this post for more.]\n\nIn Singapore Buses on iOS 26, I was able to hide the tabViewBottomAccessory based on various criteria—for example, if location tracking was enabled.\n\n.tabViewBottomAccessory {\nif locationTracker.isAuthorised {\nHStack {\n// Nearby bus stop\n}\n} else {\nEmptyView()\n}\n}\n\nNow, however, it displays the accessory with no content. I haven’t found a workaround yet, so for now I’m showing the tabViewBottomAccessory across all views. This isn’t ideal—the accessory isn’t relevant on the Settings view, for instance.\n\nIf this is Apple’s intended behaviour for the accessory, it’s far from ideal.\n\nUpdate 09 Nov 2025:\n\nThere's an update to the tabViewBottomAccessory modifier API in iOS 26.2 that lets you hide the tabViewBottomAccessory when it's not needed:\n\n.tabViewBottomAccessory(isEnabled: $showShowBottomAccessory) {\nHStack {\n// Nearby bus stop\n}\n}\n\nProblematically, this only works with iOS 26.2. As I don't intend to move away from iOS 26.0 as the minimum requirement for *Singapore Buses *for several months, I will apply this API using an if #unavailable(iOS 26.1) check. Users on iOS 26.0 - 26.1 will see the accessory on all views. 😞",
"title": "Changes to tabViewBottomAccessory in iOS 26.1 are Fixed in iOS 26.2"
}