diff --git a/packages/frontend/apps/ios/App/App/AffineViewController.swift b/packages/frontend/apps/ios/App/App/AffineViewController.swift index ddc1208580..22227845ab 100644 --- a/packages/frontend/apps/ios/App/App/AffineViewController.swift +++ b/packages/frontend/apps/ios/App/App/AffineViewController.swift @@ -11,7 +11,7 @@ class AFFiNEViewController: CAPBridgeViewController { edgesForExtendedLayout = [] let intelligentsButton = installIntelligentsButton() intelligentsButton.delegate = self - presentIntelligentsButton() // from v2.0 always visible + dismissIntelligentsButton() } override func webViewConfiguration(for instanceConfiguration: InstanceConfiguration) -> WKWebViewConfiguration { @@ -38,7 +38,11 @@ class AFFiNEViewController: CAPBridgeViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) navigationController?.setNavigationBarHidden(false, animated: animated) + DispatchQueue.main.asyncAfter(deadline: .now() + 1) { + self.presentIntelligentsButton() + } } } + diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/IntelligentsButton/IntelligentsButton.swift b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/IntelligentsButton/IntelligentsButton.swift index 59c1c32d01..a633a5c12e 100644 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/IntelligentsButton/IntelligentsButton.swift +++ b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/IntelligentsButton/IntelligentsButton.swift @@ -6,6 +6,7 @@ // import SnapKit +import SwifterSwift import Then import UIKit @@ -17,7 +18,10 @@ public class IntelligentsButton: UIView { } lazy var background = UIView().then { - $0.backgroundColor = .white + $0.backgroundColor = .init( + light: .systemBackground, + dark: .darkGray.withAlphaComponent(0.25) + ) } lazy var activityIndicator = UIActivityIndicatorView() diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/SupplementView/DeleteButtonView.swift b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/SupplementView/DeleteButtonView.swift index 25597c7596..33fbf1f290 100644 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/SupplementView/DeleteButtonView.swift +++ b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/View/SupplementView/DeleteButtonView.swift @@ -37,7 +37,7 @@ class DeleteButtonView: UIView { required init?(coder _: NSCoder) { fatalError("init(coder:) has not been implemented") } - + override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { if bounds.width < 50 || bounds.height < 50 { return bounds.insetBy(dx: -20, dy: -20).contains(point)