Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/core/ui/core/view/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,11 @@ export abstract class View extends ViewCommon {
*/
isLayoutValid: boolean;

/**
* Native background states. This is a read-only property.
*/
nativeBackgroundState?: 'unset' | 'invalid' | 'drawn';

/**
* Gets the CSS fully qualified type name.
* Using this as element type should allow for PascalCase and kebap-case selectors, when fully qualified, to match the element.
Expand Down
4 changes: 4 additions & 0 deletions packages/core/ui/core/view/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class View extends ViewCommon {
*/
_nativeBackgroundState: 'unset' | 'invalid' | 'drawn';

get nativeBackgroundState(): 'unset' | 'invalid' | 'drawn' {
return this._nativeBackgroundState;
}

/**
* Glass effect configuration
*/
Expand Down
9 changes: 9 additions & 0 deletions packages/core/ui/segmented-bar/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ export class SegmentedBar extends SegmentedBarBase {
super.disposeNativeView();
}

onLoaded() {
super.onLoaded();
// Force background redraw to ensure border radius is applied.
// This fixes the visual glitch where backgroundColor initially has sharp corners.
if (this.nativeBackgroundState === 'invalid') {
this._redrawNativeBackground(this.style.backgroundInternal);
}
}

// @ts-ignore
get ios(): UISegmentedControl {
return this.nativeViewProtected;
Expand Down
Loading