Skip to content

feat: transfer item-level appearance & new iOS navigation APIs - #319

Merged
rickytan merged 3 commits into
masterfrom
feature/new-api-adoption
Jun 16, 2026
Merged

rickytan merged 3 commits into
masterfrom
feature/new-api-adoption

Conversation

@rickytan

Copy link
Copy Markdown
Owner

Summary

Adapt to newer iOS navigation item APIs by transferring the root content view controller's UINavigationItem appearance to every child pushed onto the internal RTContainerNavigationController. All new APIs are guarded with @available so 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

API iOS Notes
UINavigationItem.standardAppearance 13 propagated
UINavigationItem.scrollEdgeAppearance 13 propagated
UINavigationItem.compactAppearance 14 propagated
UINavigationItem.compactScrollEdgeAppearance 15 propagated
UINavigationItem.backButtonDisplayMode 14 only copied when root chose a non-default mode
UINavigationItem.titleMenuProvider 16 only copied when root set one (it's a copy block)

Implementation

Added a single private method -_rt_syncNavigationItemAppearance on RTContainerNavigationController. Invoked from viewDidLoad and viewDidLayoutSubviews.

Source is the root content VC's navigationItem, reached by walking:

  • RTRootNavigationController.viewControllers.firstObject (the outermost container)
  • Unwrap RTContainerController.contentViewController if applicable

Reading from self.navigationController.navigationItem directly would have been wrong — that returns the rarely-used navigationItem of the RTRootNavigationController itself, not the one the user sets on the root content VC.

Out of scope (NOT addressed, by request)

Verification

  • clang -fsyntax-only passes cleanly with -mios-simulator-version-min=11.0
  • pod lib lint couldn't be run in agent sandbox; tag-related pre-existing issue (shallow clone, git describe --abbrev=0 returns nothing) blocks it locally — unrelated to this change
  • No public API or class hierarchy changes
  • All changes inside a single @implementation block, no header diff

rickytan added 3 commits June 16, 2026 14:18
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
rickytan force-pushed the feature/new-api-adoption branch from 0509c46 to 5d0e982 Compare June 16, 2026 12:31
@rickytan
rickytan merged commit cc58a47 into master Jun 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant