Damaged Textual content animation in iOS 16 SwiftUI


I’m creating a search function with enter textual content highlighting, and I bumped into an issue with textual content animation.

Examined on a tool with iOS 15.5, all the pieces works as meant, however on the brand new iOS 16, the textual content strikes to the top level with out animation, you may see this within the video examples beneath.

Right here is the code for the way the textual content coloration modifications:

Textual content(job.title)
        .kerning(-0.41)
        .foregroundColor(job.title.lowercased().accommodates(navigation.search.lowercased().trimmingCharacters(in: .whitespaces)) ? .accentColor : .black)
        .font(.system(dimension: 14, weight: .semibold))
        .body(width: rowDetailsViewWidth, top: 18, alignment: .main)

This video is an instance of an issue with iOS 15.5 and iOS 16:

enter image description here