iOS 26 UIKIt: Where's the missing cornerConfiguration property of UIViewEffectView?

In WWDC25 video 284: Build a UIKit app with the new design, there is mention of a cornerConfiguration property on UIVisualEffectView. But this properly isn't documented and Xcode 26 isn't aware of any such property.

I'm trying to replicate the results of that video in the section titled Custom Elements starting at the 19:15 point. There is a lot of missing details and typos in the code associated with that video.

My attempts with UIGlassEffect and UIViewEffectView do not result in any capsule shapes. I just get rectangles with no rounded corners at all.

As an experiment, I am trying to recreate the capsule with the layers/location buttons in the iOS 26 version of the Maps app.

I put the following code in a view controller's viewDidLoad method

let imgCfgLayer = UIImage.SymbolConfiguration(hierarchicalColor: .systemGray)
let imgLayer = UIImage(systemName: "square.2.layers.3d.fill", withConfiguration: imgCfgLayer)
var cfgLayer = UIButton.Configuration.plain()
cfgLayer.image = imgLayer
let btnLayer = UIButton(configuration: cfgLayer, primaryAction: UIAction(handler: { _ in
    print("layer")
}))

var cfgLoc = UIButton.Configuration.plain()
let imgLoc = UIImage(systemName: "location")
cfgLoc.image = imgLoc
let btnLoc = UIButton(configuration: cfgLoc, primaryAction: UIAction(handler: { _ in
    print("location")
}))

let bgEffect = UIGlassEffect()
bgEffect.isInteractive = true
let bg = UIVisualEffectView(effect: bgEffect)

bg.contentView.addSubview(btnLayer)
bg.contentView.addSubview(btnLoc)
view.addSubview(bg)

btnLayer.translatesAutoresizingMaskIntoConstraints = false
btnLoc.translatesAutoresizingMaskIntoConstraints = false
bg.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([
    btnLayer.leadingAnchor.constraint(equalTo: bg.contentView.leadingAnchor),
    btnLayer.trailingAnchor.constraint(equalTo: bg.contentView.trailingAnchor),
    btnLayer.topAnchor.constraint(equalTo: bg.contentView.topAnchor),
    btnLoc.centerXAnchor.constraint(equalTo: bg.contentView.centerXAnchor),
    btnLoc.topAnchor.constraint(equalTo: btnLayer.bottomAnchor, constant: 15),
    btnLoc.bottomAnchor.constraint(equalTo: bg.contentView.bottomAnchor),
    bg.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor),
    bg.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 40),
])

The result is pretty close other than the complete lack of capsule shape.

What changes would be needed to get the capsule shape? Is this even the proper approach?

The cornerConfiguration API will become available in a future beta. Please continue testing the beta releases. Thanks

I've filed FB18629279 to track this bug, as it has regressed further in Beta 3. The workaround in Beta 2 of setting UIVisualEffectView layer's cornerRadius no longer works in Beta 3.

Inspecting the UIVisualEffectView, it looks like the cornerConfiguration property is in fact available, but it just hasn't been exposed as a public API yet.

(lldb) po [self cornerConfiguration]
<UICornerConfiguration: 0x0000600002117d90; topLeft = capsule; topRight = capsule; bottomLeft = capsule; bottomRight = capsule>

Digging a bit further, we can find the initializers for the class:

(lldb) po [[UICornerConfiguration alloc] _methodDescription]
<UICornerConfiguration: 0x60000211c140>:
in UICornerConfiguration:
	Class Methods:
		+ (id) capsule; (0x1853cb920)
		+ (id) uniformBottom:(id)arg1 topLeft:(id)arg2 topRight:(id)arg3; (0x1853cb608)
		+ (id) capsuleWithMaximumRadius:(double)arg1; (0x1853cb9d8)
		+ (id) uniform:(id)arg1; (0x1853cb1e4)
		+ (id) uniformEdgesWithLeft:(id)arg1 right:(id)arg2; (0x1853cb3a4)
		+ (id) uniformEdgesWithTop:(id)arg1 bottom:(id)arg2; (0x1853cb2dc)
		+ (id) uniformLeft:(id)arg1 topRight:(id)arg2 bottomRight:(id)arg3; (0x1853cb704)
		+ (id) uniformRight:(id)arg1 topLeft:(id)arg2 bottomLeft:(id)arg3; (0x1853cb800)
		+ (id) uniformTop:(id)arg1 bottomLeft:(id)arg2 bottomRight:(id)arg3; (0x1853cb50c)

The arguments are objects of some sort, but because they are id-typed we'll have to hunt around a bit. Dumping the runtime classes gives us the following possible candidates:

_TtGCs14PartialKeyPathC5UIKit17_UICornerProvider_$
_TtGCs7KeyPathC5UIKit17_UICornerProviderGSqSd__$
_TtGCs15WritableKeyPathC5UIKit17_UICornerProviderGSqSd__$
_TtGCs7KeyPathC5UIKit17_UICornerProviderGSqPSo17UICoordinateSpace___$
_TtGCs15WritableKeyPathC5UIKit17_UICornerProviderGSqPSo17UICoordinateSpace___$
UIKit._UICornerProvider
UICornerConfiguration
UICornerStyle
_UICornerMaskingContext
_UICornerMaskingProviderMux

UICornerStyle seems like the most likely API. Dumping its methods confirms the signatures match the API signatures mentioned in the WWDC video:

po [[[UICornerStyle alloc] init] _methodDescription]
<UICornerStyle: 0x600000228140>:
in UICornerStyle:
	Class Methods:
		+ (id) containerRelative; (0x1851ac3ec)
		+ (id) containerRelativeWithMinimumRadius:(double)arg1; (0x1851ac474)
		+ (id) fixedWithRadius:(double)arg1; (0x1851ac388)

And voila!

po [UICornerConfiguration uniform:[UICornerStyle fixedWithRadius:32]]

Obviously this API is subject to change and it shouldn't be used in a production app until it's made publicly available, but if you need a workaround for your iOS 26 beta testers you should be able to patch in this API for now :)

Beta 3 patch code you can use for now and should delete once the proper APIs are available:

#import <UIKit/UIKit.h>

@interface CornerConfigurationVisualEffectView: UIVisualEffectView
- (void)setCornerRadius:(double)cornerRadius;
@end
#import "CornerConfigurationVisualEffectView"
#import <objc/runtime.h>

// iOS 26 Beta 3 does not provide any way to customize the corner radius of glass views (FB18629279).
// This class exists as a temporary workaround until the corner configuration API is fully exposed.

@interface NSObject (iOS26Beta3BugFixes)
+ (id)uniform:(id)arg1;
+ (id)fixedWithRadius:(double)arg1;
- (id)setCornerConfiguration:(id)arg1;
@end

@implementation CornerConfigurationVisualEffectView

- (void)setCornerRadius:(double)cornerRadius {
  Class uiCornerConfigurationClass = NSClassFromString(@"UICornerConfiguration");
  if (uiCornerConfigurationClass == nil) {
    return;
  }
  Class uiCornerStyleClass = NSClassFromString(@"UICornerStyle");
  if (uiCornerStyleClass == nil) {
    return;
  }
  if (![uiCornerStyleClass respondsToSelector:@selector(fixedWithRadius:)]) {
    return;
  }
  id cornerStyle = [uiCornerStyleClass fixedWithRadius:cornerRadius];
  if (![uiCornerConfigurationClass respondsToSelector:@selector(uniform:)]) {
    return;
  }
  id configuration = [uiCornerConfigurationClass uniform:cornerStyle];
  if (![self respondsToSelector:@selector(setCornerConfiguration:)]) {
    return;
  }
  [self setCornerConfiguration:configuration];
}

@end
@interface UICornerStyle : NSObject <NSCopying>
+ (instancetype)fixedWithRadius:(double)arg2;
@end

@interface UICornerConfiguration : NSObject <NSCopying>
+ (instancetype)uniform:(UICornerStyle*)arg2;
@end

@interface UIVisualEffectView (Helper)
- (void)setCornerConfiguration:(UICornerConfiguration *)arg1;
@end

add this header file to your project

iOS 26 UIKIt: Where's the missing cornerConfiguration property of UIViewEffectView?
 
 
Q