@@ -33,15 +33,26 @@ final class MessageListSkeletonView: UIView {
3333 static let dateBarCornerRadius : CGFloat = 3
3434 static let dateTopSpacing : CGFloat = 12
3535 static let cardSpacing : CGFloat = 10
36- static let topInset : CGFloat = 10
36+ static let topInset : CGFloat = {
37+ if #available( iOS 26 . 0 , * ) {
38+ return 10 + 20
39+ }
40+ return 10
41+ } ( )
3742 static let bottomInset : CGFloat = 24
3843 }
3944
40- private static let cardConfigs : [ CardConfig ] = [
45+ private static let baseCardConfigs : [ CardConfig ] = [
4146 CardConfig ( titleWidthRatio: 0.55 , lineWidthRatios: [ 0.90 , 0.68 , 0.40 ] ) ,
4247 CardConfig ( titleWidthRatio: 0.42 , lineWidthRatios: [ 0.82 , 0.52 ] ) ,
4348 CardConfig ( titleWidthRatio: 0.65 , lineWidthRatios: [ 0.88 , 0.72 , 0.55 ] ) ,
44- CardConfig ( titleWidthRatio: 0.48 , lineWidthRatios: [ 0.78 , 0.45 ] )
49+ CardConfig ( titleWidthRatio: 0.48 , lineWidthRatios: [ 0.78 , 0.45 ] ) ,
50+ CardConfig ( titleWidthRatio: 0.58 , lineWidthRatios: [ 0.86 , 0.62 , 0.36 ] )
51+ ]
52+
53+ private static let padExtraCardConfigs : [ CardConfig ] = [
54+ CardConfig ( titleWidthRatio: 0.50 , lineWidthRatios: [ 0.80 , 0.60 ] ) ,
55+ CardConfig ( titleWidthRatio: 0.62 , lineWidthRatios: [ 0.92 , 0.74 , 0.48 ] )
4556 ]
4657
4758 private let stackView = UIStackView ( )
@@ -82,7 +93,9 @@ final class MessageListSkeletonView: UIView {
8293 }
8394
8495 private func buildCards( ) {
85- for config in Self . cardConfigs {
96+ let cardConfigs = Self . baseCardConfigs + ( traitCollection. userInterfaceIdiom == . pad ? Self . padExtraCardConfigs : [ ] )
97+
98+ for config in cardConfigs {
8699 stackView. addArrangedSubview ( MessageListSkeletonCardView ( config: config, placeholderColor: placeholderColor) )
87100 }
88101 }
0 commit comments