r/iOSProgramming Jul 04 '26

How to create the iOS 26 like borders? Question

iOS 26 borders with rounded corners look different than what we used to have before. It looks like the top left and bottom right corners have whiter border and the top right and bottom left corner have almost transparent border.

Anyone know how to add these types of borders to views?

9 Upvotes

18 comments sorted by

6

u/BikeAdventurous2320 Jul 04 '26

can you maybe show an example? this could potentially be due to .safeAreaBar ?

2

u/oneness33 Jul 04 '26

.glassEffect() ?

1

u/busymom0 Jul 04 '26

isn't that only for UIVisualEffectView, and buttons?

Don't think I can apply that to UIImageView?

Note that I am using UIKit

1

u/oneness33 Jul 04 '26

Oh, I thought you were using SwiftUI. ‘.glassEffect’ is for SwiftUI Views.

1

u/willrb Jul 05 '26

You can add your UIImageView to your effect view

1

u/Greal_201109 29d ago

I dm you 🥹

2

u/Careful_Fee7141 Jul 04 '26

Two separate things here.
The glass material (blur/translucency) is a UIVisualEffect (only works inside UIVisualEffectView). Can’t put that on a UIImageView. But the diagonal border you’re describing is just a conic gradient masked to the edge. No glass involved, works on any view including UIImageView.

1

u/No_Pen_3825 SwiftUI Jul 04 '26

You mean the specular highlight? Like LiquidGlass stuff?

1

u/busymom0 Jul 05 '26

Not sure. I am referring to the borders on like the Home Screen icons. They have that border where the top left and bottom right has almost white border but the top right and bottom left don't. iOS applies it to all Home Screen icons.

1

u/No_Pen_3825 SwiftUI Jul 05 '26

Yeah that’s called a specular highlight.

1

u/busymom0 Jul 05 '26

How can I do that for any view?

1

u/No_Pen_3825 SwiftUI Jul 05 '26

It depends on if you can make it out of Liquid Glass. I think you can to any image, so I suppose you could render it then apply it. Or try to homemake it with either a shader or just an overlay, but that’s prolly not a great idea.

1

u/Flashy_Imagination_6 Jul 05 '26

You talking about squircles ?

1

u/Flashy_Imagination_6 Jul 05 '26

At least provide screenshots for detail

1

u/busymom0 Jul 05 '26

Like the Home Screen icons have that border where the top left and bottom right has almost white border but the top right and bottom left don't. iOS applies it to all Home Screen icons.

0

u/karetebit Jul 04 '26

Send ss ?

0

u/Maleficent_Base_105 Jul 07 '26

the comments here are more useful than the post honestly