Use larger (40 dp) corner radius for stories cards on iOS 26.

This commit is contained in:
Igor Solomennikov 2026-05-15 16:30:15 -07:00 committed by GitHub
parent fa6f8e6489
commit 32e804824e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -253,10 +253,11 @@ class StoryContextViewController: OWSViewController {
playbackProgressView.isUserInteractionEnabled = false
if UIDevice.current.hasIPhoneXNotch || UIDevice.current.isIPad {
let cornerRadius: CGFloat = if #available(iOS 26, *) { 40 } else { 18 }
// iPhone with notch or iPad (views/replies rendered below media, media is in a card)
mediaViewContainer.layer.cornerRadius = 18
mediaViewContainer.layer.cornerRadius = cornerRadius
mediaViewContainer.clipsToBounds = true
onboardingOverlay.layer.cornerRadius = 18
onboardingOverlay.layer.cornerRadius = cornerRadius
onboardingOverlay.clipsToBounds = true
repliesAndViewsButton.autoPinEdge(.top, to: .bottom, of: mediaViewContainer)
playbackProgressView.autoPinEdge(.bottom, to: .top, of: repliesAndViewsButton, withOffset: -OWSTableViewController2.defaultHOuterMargin)

View File

@ -50,7 +50,7 @@ class StoryItemMediaView: UIView {
updateMediaView()
if UIDevice.current.hasIPhoneXNotch || UIDevice.current.isIPad {
layer.cornerRadius = 18
layer.cornerRadius = if #available(iOS 26, *) { 40 } else { 18 }
clipsToBounds = true
}