Skip to content

iOS 26/27/Liquid Glass compatibility - #158

Merged
mmertsock merged 10 commits into
feature/os-27from
mmertsock/os-27
Sep 4, 2026
Merged

iOS 26/27/Liquid Glass compatibility#158
mmertsock merged 10 commits into
feature/os-27from
mmertsock/os-27

Conversation

@mmertsock

@mmertsock mmertsock commented Aug 27, 2026

Copy link
Copy Markdown
Member

Requires Xcode 27

Various toolbar/button changes to support iOS 26/27 and Liquid Glass (none of these changes appear for devices running iOS 18 or earlier):

  • Nav bar is explicitly opaque: various ResearchKit internal views (table views, etc.) have some layout peculiarities with margins/safe area underneath navigation bars, which produce ugly visual artifacts when using the default translucent toolbar look with liquid glass. I think it's not worth the effort to make deep layout changes just to get this to work well, so now task view controllers simply configure an opaque navigation bar (hard-coded to white; we have decided we will not support dark mode in ResearchKit)
  • ResearchKit V1 linear style progress bar: moved from the center (title) position in the nav bar to below the nav bar. I couldn't get the progress bar to stay nicely centered in the title position, and overall I think the new position looks better.
  • ResearchKit V2: text fields attach a "Done" button to the accessory bar above the software keyboard. Made adjustments to this to more or less preserve the flat iOS 18 look. I couldn't find a layout with Liquid Glass appearance that worked well
  • Adjustments to various other bar button items to get the best appearance with Liquid Glass

Enhancement:

  • Linear style progress bar in V1 surveys: progress changes are now animated

Asking for feedback or contrary opinions on design choices:

  • Do we like having liquid glass toolbar items in ResearchKit surveys, overall?
  • Cancel button: I opted for a text "Cancel" inside a liquid glass capsule. iOS does have a system cancel button that's a large "X" but I thought an explicit "Cancel" label was better for surveys.

Developer testing with Xcode (before this is fully integrated into MyDataHelps)

The easiest way to test is to use the corresponding CEVResearchKit PR, and run the CEVRKUITestVehicle app on a simulator or device. Suggested surveys: ConsentStep, FormStep, FullBattery, ProgressOptions, QuestionStepText, QuestionStepTextAllowMultipleLinesInput. Don't forget to toggle the "version 2" switch to test both versions of ResearchKit.

QA testing

TODO

Screenshots

Each set of screenshots shows (1) the current appearance / iOS 18 appearance with this PR, (2) various UI bugs with Xcode 27 without the fixes in this PR, (3) the final UI rendered with this PR.

Basic bar buttons and progress bar

RK1 bar items

Save/discard prompt

Save discard

Navigation bar opacity

Note the bug in the center screenshot: a hard edge halfway down the nav bar.

Opaque bar

RK1 text-style progress indicator alternative

X of Y progress

RK2 "Done" button above keyboard, and progress indicator in nav bar

RK2 accessory

@mmertsock
mmertsock changed the base branch from CEVRelease-2.x to feature/os-27 August 27, 2026 19:28
@mmertsock
mmertsock requested a review from eschramm August 31, 2026 12:58

@eschramm eschramm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor issues noted. One other very minor issue, not related to the code changes here, is that the tint color of the Done button does not get the proper override tinting because of how it's added to the view. I've made a branch (https://github.com/CareEvolution/ResearchKit/tree/eschramm/os-27-suggestions) that has 3 commits for some ideas on how to tackle these minor issues, including restoring the ability to UI-test the progress bar progress. Thanks for taking this on :smiling

Comment thread ORK1Kit/ORK1Kit/Common/CEVRK1NavigationBarProgressView.m
Comment thread ORK1Kit/ORK1Kit/Common/ORK1TaskViewController.m Outdated
Comment thread ORK1Kit/ORK1Kit/Common/CEVRK1NavigationBarProgressView.m Outdated
]];
if (@available(iOS 26.0, *)) {
_progressView.backgroundColor = [UIColor whiteColor];
[NSLayoutConstraint activateConstraints:@[

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there are no vertical constraints on the progressView here leaving placement ambiguous. I think this could present problems. Here are a few edge cases I saw in the CEVRKUITestVehicle. One option is we could give the container a real constant height first, then pin the progress bar to the bottom. I'm not opposed to the current solution, just considering it may pose aesthetic problems in existing surveys without much spacing to top.

Image|Image

@mmertsock

Copy link
Copy Markdown
Member Author

Thanks for the suggestions, they look good. I pulled them into the PR branch, and was able to restore the original progress view tests in CEVResearchKit (the empty UIView for the navigation title is a clever idea).

@eschramm

eschramm commented Sep 3, 2026

Copy link
Copy Markdown

Cool - thanks also for the adds. LGTM 👍

@mmertsock
mmertsock merged commit 6379da9 into feature/os-27 Sep 4, 2026
1 check passed
@mmertsock
mmertsock deleted the mmertsock/os-27 branch September 4, 2026 01:11
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.

2 participants