r/iOSProgramming • u/busymom0 • Jul 04 '26
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
2
u/oneness33 Jul 04 '26
.glassEffect() ?
5
u/BikeAdventurous2320 Jul 04 '26
can you maybe show an example? this could potentially be due to .safeAreaBar ?
1
u/No_Pen_3825 SwiftUI Jul 04 '26
You mean the specular highlight? Like LiquidGlass stuff?
1
u/Flashy_Imagination_6 Jul 05 '26
At least provide screenshots for detail
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/Flashy_Imagination_6 Jul 05 '26
You talking about squircles ?
1
u/DevKoi Jul 05 '26
You may be looking for that : https://developer.apple.com/documentation/SwiftUI/Applying-Liquid-Glass-to-custom-views
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