feat: transfer item-level appearance & new iOS navigation APIs - #319
Merged
Merged
Conversation
Add support for newer iOS appearance APIs on UINavigationItem, transferring them from the root content view controller to every child pushed onto the internal RTContainerNavigationController. APIs added (all guarded with @available to keep iOS 11 deployment target): - UINavigationItem.standardAppearance / scrollEdgeAppearance (iOS 13) - UINavigationItem.compactAppearance (iOS 14) - UINavigationItem.compactScrollEdgeAppearance (iOS 15) - UINavigationItem.backButtonDisplayMode (iOS 14, only when root chose a non-default mode, to avoid clobbering per-VC preferences) - UINavigationItem.titleMenuProvider (iOS 16, only when root set one) Source: the root content view controller's navigationItem, reached via RTRootNavigationController.viewControllers.firstObject (unwrapping RTContainerController.contentViewController when applicable).
Remove the .travis.yml (pinned to xcode 8.2 from 2016, effectively dead) and update the README badge to point at the existing .github/workflows/objective-c-xcode.yml workflow. No CI coverage change in practice — the GitHub Actions workflow was already in place and runs `pod lib lint`.
actions/checkout defaults to fetch-depth: 1, which means `git describe --abbrev=0` (failing in podspec) cannot reach any tag even when fetch-tags: true is set. Add fetch-depth: 0 to fetch full history. Fixes the `A version is required` pod lib lint failure on PR builds.
rickytan
force-pushed
the
feature/new-api-adoption
branch
from
June 16, 2026 12:31
0509c46 to
5d0e982
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adapt to newer iOS navigation item APIs by transferring the root content view controller's
UINavigationItemappearance to every child pushed onto the internalRTContainerNavigationController. All new APIs are guarded with@availableso the iOS 11 deployment target is preserved.Scope (per maintainer's request)
This PR is API-adaptation only — no bug fixes, no deployment target bump, no architecture changes.
New APIs wired up
UINavigationItem.standardAppearanceUINavigationItem.scrollEdgeAppearanceUINavigationItem.compactAppearanceUINavigationItem.compactScrollEdgeAppearanceUINavigationItem.backButtonDisplayModeUINavigationItem.titleMenuProvidercopyblock)Implementation
Added a single private method
-_rt_syncNavigationItemAppearanceonRTContainerNavigationController. Invoked fromviewDidLoadandviewDidLayoutSubviews.Source is the root content VC's navigationItem, reached by walking:
RTRootNavigationController.viewControllers.firstObject(the outermost container)RTContainerController.contentViewControllerif applicableReading from
self.navigationController.navigationItemdirectly would have been wrong — that returns the rarely-used navigationItem of theRTRootNavigationControlleritself, not the one the user sets on the root content VC.Out of scope (NOT addressed, by request)
setViewControllerscrashrightBarButtonItemcrashscrollEdgeAppearancesync)Verification
clang -fsyntax-onlypasses cleanly with-mios-simulator-version-min=11.0pod lib lintcouldn't be run in agent sandbox; tag-related pre-existing issue (shallow clone,git describe --abbrev=0returns nothing) blocks it locally — unrelated to this change@implementationblock, no header diff