Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iOS 14.2 #7

Merged
merged 6 commits into from
Mar 21, 2021
Merged

Fix iOS 14.2 #7

merged 6 commits into from
Mar 21, 2021

Conversation

SatoTakeshiX
Copy link
Owner

@SatoTakeshiX SatoTakeshiX commented Mar 21, 2021

iOS 14.2からFilter SampleのバナーがSafe Areaをはみ出てしまっていたので修正
その他不具合修正

  • DataFlowSampleの不要なHStack削除
  • @StateObjectのプロパティをprivateに
  • FilterSampleのFilterBannerViewをGeometryReader直下に移動
  • GitHubApiClientSampleのスター数が0固定の不具合修正

FilterBannerView

before iOS 14.4 after iOS 14.4
iOS 14 4_iPhone_11_before iOS 14 4_iPhone_11_after

Comment on lines -9 to -12
HStack {
ChildView(counter: $counter)
.frame(width: .infinity)
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要なHStack削除

@@ -8,7 +8,7 @@ final class DataSource: ObservableObject {
}

struct ParentView: View {
@StateObject var dataSource = DataSource()
@StateObject private var dataSource = DataSource()
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StateObjectのプロパティにprivate追加

Comment on lines +30 to +33
GeometryReader { geometry in
FilterBannerView(isShowBanner: $viewModel.isShowBanner, applyingFilter: $viewModel.applyingFilter, bottomSafeAreaInsets: geometry.safeAreaInsets.bottom)
.edgesIgnoringSafeArea(.bottom)
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS 14.2からbottomSafeAreaInsetsは親ビューから渡さないといけなくなったよう

@@ -11,7 +11,7 @@ import SafariServices

struct SafariView: UIViewControllerRepresentable {
typealias UIViewControllerType = SFSafariViewController
var url: URL
let url: URL
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更しないのでletにする

@SatoTakeshiX SatoTakeshiX merged commit 88a92cb into master Mar 21, 2021
@SatoTakeshiX SatoTakeshiX deleted the fix-xcode12.2 branch April 10, 2021 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant