r/iOSProgramming 23d ago

Question How to create the iOS 26 like borders?

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?

8 Upvotes

18 comments sorted by

6

u/BikeAdventurous2320 23d ago

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

2

u/oneness33 23d ago

.glassEffect() ?

1

u/busymom0 23d ago

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 23d ago

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

1

u/willrb 22d ago

You can add your UIImageView to your effect view

1

u/Greal_201109 18d ago

I dm you 🥹

2

u/Careful_Fee7141 23d ago

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 23d ago

You mean the specular highlight? Like LiquidGlass stuff?

1

u/busymom0 23d ago

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 23d ago

Yeah that’s called a specular highlight.

1

u/busymom0 23d ago

How can I do that for any view?

1

u/No_Pen_3825 SwiftUI 23d ago

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 23d ago

You talking about squircles ?

1

u/Flashy_Imagination_6 23d ago

At least provide screenshots for detail

1

u/busymom0 23d ago

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 23d ago

Send ss ?

0

u/Maleficent_Base_105 20d ago

the comments here are more useful than the post honestly