iOS 15 에서 UITableView section header top padding 값이 기본세팅 되어있다.
아래처럼 앱 전체에 적용하여 간단하게 해결할 수 있다.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if (@available(iOS 15.0, *)) {
[[UITableView appearance] setSectionHeaderTopPadding:0.0f];
}
return YES;
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
if #available(iOS 15.0, *) {
UITableView.appearance().sectionHeaderTopPadding = .zero
}
return true
}