@@ -167,13 +167,8 @@ function addButtonsToAlertController(alertController: MDCAlertController, option
167
167
168
168
function createAlertController ( options : DialogOptions & MDCAlertControlerOptions , resolve ?: Function ) {
169
169
const alertController = MDCAlertControllerImpl . alloc ( ) . init ( ) as IMDCAlertControllerImpl ;
170
- const colorScheme = themer . getAppColorScheme ( ) as MDCSemanticColorScheme ;
171
- const scheme = MDCContainerScheme . alloc ( ) . init ( ) ;
172
- if ( colorScheme ) {
173
- scheme . colorScheme = colorScheme ;
174
- }
175
- // Step 3: Apply the container scheme to your component using the desired alert style
176
- alertController . applyThemeWithScheme ( scheme ) ;
170
+ alertController . mdc_adjustsFontForContentSizeCategory = true ;
171
+
177
172
if ( options . title ) {
178
173
alertController . title = options . title ;
179
174
}
@@ -266,7 +261,6 @@ function createAlertController(options: DialogOptions & MDCAlertControlerOptions
266
261
( alertController . view as MDCAlertControllerView ) . contentInsets = UIEdgeInsetsZero ;
267
262
} else {
268
263
alertController . _disableContentInsets = true ;
269
-
270
264
}
271
265
}
272
266
view . viewController = alertController ; // needed to prevent a crash in layoutChild
@@ -528,13 +522,12 @@ export function login(arg: any): Promise<LoginResult> {
528
522
529
523
function showUIAlertController ( alertController : MDCAlertController ) {
530
524
// themer needs to be applied after actions creation
531
-
532
- const colorScheme : MDCSemanticColorScheme = themer . getAppColorScheme ( ) ;
525
+ const colorScheme = themer . getAppColorScheme ( ) as MDCSemanticColorScheme ;
526
+ const scheme = MDCContainerScheme . alloc ( ) . init ( ) ;
533
527
if ( colorScheme ) {
534
- MDCAlertColorThemer . applySemanticColorSchemeToAlertController ( colorScheme , alertController ) ;
535
- // } else {
536
- // MDCAlertControllerThemer.applySchemeToAlertController(MDCAlertScheme.alloc().init(), alertController);
528
+ scheme . colorScheme = colorScheme ;
537
529
}
530
+ alertController . applyThemeWithScheme ( scheme ) ;
538
531
539
532
let currentView = getCurrentPage ( ) || Application . getRootView ( ) ;
540
533
@@ -553,7 +546,6 @@ function showUIAlertController(alertController: MDCAlertController) {
553
546
alertController . popoverPresentationController . sourceRect = CGRectMake ( viewController . view . bounds . size . width / 2.0 , viewController . view . bounds . size . height / 2.0 , 1.0 , 1.0 ) ;
554
547
alertController . popoverPresentationController . permittedArrowDirections = 0 ;
555
548
}
556
-
557
549
viewController . presentViewControllerAnimatedCompletion ( alertController , true , null ) ;
558
550
}
559
551
return viewController ;
0 commit comments