とにUIAlertView適合することがわかっています。UIAppearanceUIAppearanceContainer
UIAppearanceしかし、カスタマイズ/スタイルを使用するにはどうすればよいUIAlertViewですか? ネットで調べてもわかりません。
とにUIAlertView適合することがわかっています。UIAppearanceUIAppearanceContainer
UIAppearanceしかし、カスタマイズ/スタイルを使用するにはどうすればよいUIAlertViewですか? ネットで調べてもわかりません。
UIAppearanceを使用してカスタマイズすることはできませんUIAlertView。
UIAlertViewは に準拠し、のサブクラスであるUIAppearanceため、 を持つとのみ表示されます。UIViewUIAppearanceUIAlertViewUIView
ただし、実際には実装されていません。
機能、モーダル ビューなどを使用する場合UIAlertViewは、サブクラス化できます。
お役に立てれば。
UIAlertView をカスタマイズする場合は、UIAlertView のサブクラスを作成しました。UIAppearance と同様のプロキシをサポートするgithub WCAlertViewで見つけることができます。これを使用して、すべての WCAlertView のデフォルトの外観を設定できます。
[WCAlertView setDefaultCustomiaztonBlock:^(WCAlertView *alertView) {
alertView.labelTextColor = [UIColor colorWithRed:0.11f green:0.08f blue:0.39f alpha:1.00f];
alertView.labelShadowColor = [UIColor whiteColor];
UIColor *topGradient = [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f];
UIColor *middleGradient = [UIColor colorWithRed:0.93f green:0.94f blue:0.96f alpha:1.0f];
UIColor *bottomGradient = [UIColor colorWithRed:0.89f green:0.89f blue:0.92f alpha:1.00f];
alertView.gradientColors = @[topGradient,middleGradient,bottomGradient];
alertView.outerFrameColor = [UIColor colorWithRed:250.0f/255.0f green:250.0f/255.0f blue:250.0f/255.0f alpha:1.0f];
alertView.buttonTextColor = [UIColor colorWithRed:0.11f green:0.08f blue:0.39f alpha:1.00f];
alertView.buttonShadowColor = [UIColor whiteColor];
}];