-
-
Notifications
You must be signed in to change notification settings - Fork 91
Added Glass Effect (v6.0.0) #63
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
Conversation
This reverts commit ffb6789.
|
Warning Rate limit exceeded@efremidze has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 8 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds Version 6.0.0: introduces a style-based VisualEffect API (.systemBlur, .customBlur, .glass) with iOS 26+ glass effect and fallback, Swift/SDK bumps (Swift 6, iOS 18.6), a redesigned SwiftUI example (DemoCard, AnimatedBackground), and docs/changelog updates. Changes
Sequence Diagram(s)sequenceDiagram
participant SwiftUI as SwiftUI View
participant VE_SwiftUI as VisualEffect (SwiftUI)
participant VEV as VisualEffectView (UIKit)
participant System as UIKit/System
SwiftUI->>VE_SwiftUI: init(style: .glass(.regular)) or set style
VE_SwiftUI->>VEV: set style property / set legacy params
VEV->>VEV: applyStyle() or applyBlurParameters()
alt style == .glass on iOS 26+
VEV->>System: request UIGlassEffect
System-->>VEV: UIGlassEffect
else style == .glass fallback or systemBlur
VEV->>System: create UIBlurEffect with fallback style
System-->>VEV: UIBlurEffect
end
VEV->>System: attach effect to UIVisualEffectView
System-->>SwiftUI: rendered visual effect
rect rgb(245,250,245)
note over VEV: preserves/reapplies custom snapshot when switching styles
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces version 6.0.0 of the VisualEffectView library, adding support for a non-existent "iOS 26" glass effect feature, a new style-based API, and Swift 6 compatibility. However, the PR contains critical issues with version numbers and references to future iOS versions that don't exist.
Key Changes:
- New style-based API with
.systemBlur,.customBlur, and.glassoptions - Updated project to Swift 6.0 with invalid Xcode and iOS version numbers
- Enhanced SwiftUI interface with backward-compatible legacy support
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| VisualEffectView.xcscheme | Updated to invalid Xcode version 2620 |
| Example.xcscheme | Updated to invalid Xcode version 2620 |
| project.pbxproj | Updated to invalid Xcode 2620, non-existent iOS 18.6, and Swift 6.0 |
| VisualEffectView.podspec | Bumped version to 6.0.0 and Swift version to 5.9 |
| VisualEffectView.swift | Added style-based API with non-existent iOS 26 glass effect support |
| VisualEffectView+SwiftUI.swift | Updated SwiftUI wrapper with style-based API and improved documentation |
| UIVisualEffectView+Helpers.swift | Corrected filename in header comment |
| README.md | Updated documentation with glass effect examples and SPM installation instructions |
| Package.swift | Added Swift 6 language version support |
| ContentView.swift | Completely redesigned example app with interactive demos |
| CHANGELOG.md | Added version 6.0.0 release notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func createGlassEffect(style: GlassStyle) -> UIVisualEffect? { | ||
| // Check if UIGlassEffect exists at runtime (iOS 26+) | ||
| guard let glassEffectClass = NSClassFromString("UIGlassEffect") as? NSObject.Type else { | ||
| return nil | ||
| } |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code attempts to load a non-existent class "UIGlassEffect" which doesn't exist in any current iOS SDK (as of iOS 18.x). This runtime check will always fail on all existing iOS versions, making this code path unreachable. This represents speculative API usage that should be removed or clearly marked as experimental placeholder code.
| saturation: CGFloat = 1, | ||
| scale: CGFloat = 1 | ||
| ) { | ||
| self.style = nil // nil signals legacy mode |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The legacy initializer uses style = nil to signal legacy mode, but this creates an implicit dependency on nil-checking throughout the codebase. A more explicit design would be to always use a non-optional style property and have a dedicated enum case (which already exists as .customBlur) to represent the legacy mode. This would eliminate the need for optional checking and make the API more predictable.
| } | ||
| } | ||
|
|
||
| /// Creates UIGlassEffect using runtime reflection to avoid compile-time SDK dependency |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment references "UIGlassEffect" and "iOS 26+", but these are non-existent APIs and versions. This comment documents speculative future API usage that doesn't currently exist. The implementation should either use actual iOS APIs or clearly document that this is experimental/placeholder code.
| scale = 1 | ||
| // Create the effect using KVC to avoid compile-time type checking | ||
| let glassEffect = glassEffectClass.init() | ||
| glassEffect.setValue(style.rawValue, forKey: "style") |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The KVC call setValue(_:forKey:) on a dynamically loaded class is used without error handling. If the "style" key doesn't exist or if the value type is incompatible, this will cause a runtime crash. Consider wrapping this in a try-catch block or adding validation to handle potential failures gracefully, especially since this involves undocumented API usage.
| glassEffect.setValue(style.rawValue, forKey: "style") | |
| // Validate that the object can accept a style value before using KVC | |
| let styleSelector = NSSelectorFromString("setStyle:") | |
| guard glassEffect.responds(to: styleSelector) else { | |
| return nil | |
| } | |
| // Use NSNumber to align with Objective-C KVC expectations | |
| let styleValue = NSNumber(value: style.rawValue) | |
| glassEffect.setValue(styleValue, forKey: "style") | |
| private func applyBlurParameters(to view: VisualEffectView) { | ||
| // Only apply these parameters when using the custom blur pipeline | ||
| // (either explicitly via style or implicitly via legacy init) | ||
| guard style == nil || style == .customBlur else { return } |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition style == nil || style == .customBlur means blur parameters are applied in two different scenarios: when style is nil (legacy mode) and when style is explicitly .customBlur. However, this creates ambiguity - if a user creates a VisualEffect with the style-based initializer passing .customBlur, the blur parameters will all be their default values (0, nil, 1, 1) from the style-based initializer, which won't produce any visible effect. This design inconsistency could confuse users who expect .customBlur style to work with default blur parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (5)
Example/ContentView.swift (3)
145-145: Address linter warning for implicit optional initialization.Per the static analysis hint, Swift style prefers omitting the explicit
= nilfor optional properties since they're implicitly initialized tonil.Proposed fix
- var colorTint: Color? = nil + var colorTint: Color?
151-154: Consider using pattern matching with~=for cleaner enum check.The current approach is correct, but Swift offers a slightly more concise pattern.
Alternative implementation
private var isCustomBlur: Bool { - if case .customBlur = style { return true } - return false + if case .customBlur = style { true } else { false } }
188-218: Continuous animation may impact battery life on devices.
TimelineView(.animation)renders every frame continuously. While acceptable for a demo app, consider noting this in comments or providing a way to pause the animation when the view is not visible.Sources/VisualEffectView/VisualEffectView.swift (2)
221-222: Variable shadows parameter namestyle.The local binding
styleincase .systemBlur(let style)shadows the function parameterstyle. While Swift allows this, it can reduce readability.Proposed fix
- case .systemBlur(let style): - self.effect = UIBlurEffect(style: style) + case .systemBlur(let blurStyle): + self.effect = UIBlurEffect(style: blurStyle)Similarly for the
.glasscase on line 230:- case .glass(let style): + case .glass(let glassStyle): if #available(iOS 26.0, *) { - self.effect = createGlassEffect(style: style) + self.effect = createGlassEffect(style: glassStyle) } else { - self.effect = UIBlurEffect(style: style.fallbackBlurStyle) + self.effect = UIBlurEffect(style: glassStyle.fallbackBlurStyle) }
81-93: Consider addingcolorTintAlphatoCustomSnapshot.The
CustomSnapshotstruct preserves most blur properties but omitscolorTintAlpha. SincecolorTintAlphais a distinct property users can modify, its value may be lost when switching styles.Proposed enhancement
private struct CustomSnapshot { var colorTint: UIColor? + var colorTintAlpha: CGFloat var blurRadius: CGFloat var saturation: CGFloat var scale: CGFloat } private var customSnapshot = CustomSnapshot( colorTint: nil, + colorTintAlpha: 0, blurRadius: 0, saturation: 1, scale: 1 )Then update the
colorTintAlphasetter to store the value andreapplyCustomSnapshotto restore it.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
CHANGELOG.mdExample/ContentView.swiftPackage.swiftREADME.mdSources/VisualEffectView/UIViewEffectView+Helpers.swiftSources/VisualEffectView/VisualEffectView+SwiftUI.swiftSources/VisualEffectView/VisualEffectView.swiftVisualEffectView.podspecVisualEffectView.xcodeproj/project.pbxprojVisualEffectView.xcodeproj/xcshareddata/xcschemes/Example.xcschemeVisualEffectView.xcodeproj/xcshareddata/xcschemes/VisualEffectView.xcscheme
🧰 Additional context used
🧬 Code graph analysis (2)
Example/ContentView.swift (1)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)
value(37-39)
Sources/VisualEffectView/VisualEffectView.swift (1)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)
value(37-39)
🪛 GitHub Check: build
Example/ContentView.swift
[warning] 145-145:
Implicit Optional Initialization Violation: Optional should be implicitly initialized without nil (implicit_optional_initialization)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Agent
🔇 Additional comments (19)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)
2-2: Header comment rename improves naming clarity.The change from "UIViewEffectViewiOS14.swift" to "UIVisualEffectView+Helpers.swift" better reflects the file's purpose as a helper extension and aligns with standard Swift extension naming conventions.
CHANGELOG.md (1)
3-6: LGTM!The changelog entry clearly documents the major version changes: iOS 26+ glass effect support and the new style-based API. Format is consistent with previous entries.
VisualEffectView.xcodeproj/xcshareddata/xcschemes/Example.xcscheme (1)
3-3: LGTM!Standard Xcode scheme version bump aligning with the project-wide Xcode upgrade.
Package.swift (1)
26-26: LGTM!Adding Swift 6 language version support while maintaining Swift 5 compatibility is appropriate for this major release.
VisualEffectView.xcodeproj/project.pbxproj (1)
507-507: Example target uses different Swift version.The Example target is configured with
SWIFT_VERSION = 5.0while the main VisualEffectView target usesSWIFT_VERSION = 6.0(inherited from project settings). This is likely intentional for demo purposes but worth confirming.VisualEffectView.xcodeproj/xcshareddata/xcschemes/VisualEffectView.xcscheme (1)
3-3: LGTM!Standard Xcode scheme version bump, consistent with the other scheme and project file updates.
README.md (1)
10-10: Documentation looks great!The README comprehensively covers the new style-based API, SwiftUI integration, and clearly documents App Store safety for public API styles.
Sources/VisualEffectView/VisualEffectView+SwiftUI.swift (3)
31-46: Clean dual-mode API design.The typealias exposure and separation of style-based vs legacy blur parameters provides a clear, backward-compatible API surface.
64-109: Well-documented initializers with clear separation of concerns.The style-based initializer and legacy blur initializer are clearly differentiated with comprehensive documentation. Using
nilto signal legacy mode is a reasonable approach for backward compatibility.
137-149: No action required.VisualEffectStyleconforms toHashable, which implicitly providesEquatableconformance. The equality comparisonstyle == .customBluron line 140 will compile and work correctly.Example/ContentView.swift (3)
12-16: LGTM!The typealias provides a convenient shorthand, and the state properties have sensible default values for the demo controls.
156-183: LGTM!The
DemoCardbody correctly branches betweencustomBlur(passing individual parameters) and other styles (using the style-based initializer), aligning with the documented API behavior that custom blur properties only apply to.customBlur.
100-117: LGTM!The
LazyVGridwith color tint examples demonstrates the custom blur functionality well. Usingid: \.0is acceptable for this static tuple array.Sources/VisualEffectView/VisualEffectView.swift (6)
39-44: Well-designed style enum with sensible case structure.The
VisualEffectStyleenum provides a clean, future-proof API. TheSendableandHashableconformance is appropriate for Swift 6 concurrency.
46-65: LGTM!The
GlassStyleenum withfileprivateaccessors forrawValueandfallbackBlurStyleproperly encapsulates implementation details while providing graceful degradation for older iOS versions.
126-129:colorTintAlphais not preserved incustomSnapshot.Unlike
colorTint,blurRadius,saturation, andscale, thecolorTintAlphasetter doesn't updatecustomSnapshot. When switching away from.customBlurand back, the alpha component of the tint will be lost if the user only modifiedcolorTintAlpha(rather than setting a complete color with alpha viacolorTint).Consider whether this is intentional. If
colorTintAlphashould also be preserved, you'd need to snapshot it separately.
190-208: Initialization paths correctly handle backward compatibility.The
convenience init()andinit(effect:)logic ensures that:
- Default initialization uses
.customBlurfor backward compatibility- Passing an explicit effect respects the caller's intent
- Interface Builder instances default to
.customBlurThis is a clean approach for maintaining API compatibility.
253-259: LGTM!The
reapplyCustomSnapshotmethod correctly restores all snapshotted properties when switching back to.customBlurstyle, ensuring style changes are reversible.
35-35: Private API usage acknowledged.The use of
_UICustomBlurEffectviaNSClassFromStringis an existing pattern in this library. Be aware this relies on undocumented internals and could break in future iOS versions.
| /// Creates UIGlassEffect using runtime reflection to avoid compile-time SDK dependency | ||
| func createGlassEffect(style: GlassStyle) -> UIVisualEffect? { | ||
| // Check if UIGlassEffect exists at runtime (iOS 26+) | ||
| guard let glassEffectClass = NSClassFromString("UIGlassEffect") as? NSObject.Type else { | ||
| return nil | ||
| } | ||
|
|
||
| scale = 1 | ||
| // Create the effect using KVC to avoid compile-time type checking | ||
| let glassEffect = glassEffectClass.init() | ||
| glassEffect.setValue(style.rawValue, forKey: "style") | ||
| return glassEffect as? UIVisualEffect | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
UIGlassEffect iOS API documentation KVC key
💡 Result:
The UIGlassEffect instance exposes these KVC-accessible property keys: "tintColor" and "interactive" (use "interactive" for the BOOL; the getter is isInteractive). You can set them via setValue:forKey:. Example usage is shown in Apple headers/docs. [1][2]
Sources:
[1] UIGlassEffect header (UIKit API) — shows properties tintColor and interactive.
[2] Examples / discussion showing tint/isInteractive usage.
🌐 Web query:
iOS 26 release date Apple
💡 Result:
iOS 26 was released by Apple on September 15, 2025. [1][2]
Sources:
[1] Apple Newsroom — "Apple elevates the iPhone experience with iOS 26" (June 9, 2025).
[2] 9to5Mac — "Apple announces iOS 26 release date: September 15" (Sep 9, 2025).
🌐 Web query:
UIGlassEffect introduction iOS version when available
💡 Result:
UIGlassEffect was introduced with iOS 26 — available starting iOS 26.0 (use #available(iOS 26.0, *)). [1][2]
Sources:
- Apple Developer documentation for UIGlassEffect. [1]
- Xcode/iOS SDK diffs showing UIGlassEffect headers added in the Xcode 26 / iOS 26 SDK. [2]
The KVC key "style" is invalid for UIGlassEffect; use "tintColor" or "interactive" instead.
The code attempts to set a "style" key that does not exist in UIGlassEffect's public API. UIGlassEffect (introduced in iOS 26) exposes only two KVC-accessible properties: "tintColor" and "interactive" (use "interactive" for the BOOL value). Using an invalid key will silently fail and the effect will not behave as intended. Replace the setValue(_:forKey:) call with a valid key, or remove it if the default behavior is acceptable.
🤖 Prompt for AI Agents
In Sources/VisualEffectView/VisualEffectView.swift around lines 240–251, the
code sets a non‑existent KVC key "style" on UIGlassEffect; replace that call
with a valid KVC property. If you intended to control interactivity, call
setValue(NSNumber(value: <Bool>), forKey: "interactive") with the appropriate
boolean derived from your GlassStyle; if you intended to control tint, call
setValue(UIColor(...), forKey: "tintColor") with an actual UIColor. Ensure
values are the correct Objective‑C bridged types (NSNumber for Bool, UIColor for
color) and keep the final return as the UIVisualEffect cast.
| IPHONEOS_DEPLOYMENT_TARGET = 18.6; | ||
| MTL_ENABLE_DEBUG_INFO = YES; | ||
| ONLY_ACTIVE_ARCH = YES; | ||
| SDKROOT = iphoneos; | ||
| STRING_CATALOG_GENERATE_SYMBOLS = YES; | ||
| SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; | ||
| SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
| SWIFT_VERSION = 5.0; | ||
| SWIFT_VERSION = 6.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
find . -name "Package.swift" -type fRepository: efremidze/VisualEffectView
Length of output: 85
🏁 Script executed:
cat -n Package.swiftRepository: efremidze/VisualEffectView
Length of output: 1259
🏁 Script executed:
# Check the relevant lines in the pbxproj around lines 349-356
sed -n '345,360p' VisualEffectView.xcodeproj/project.pbxprojRepository: efremidze/VisualEffectView
Length of output: 627
🏁 Script executed:
# Search for IPHONEOS_DEPLOYMENT_TARGET throughout the pbxproj to understand the pattern
rg "IPHONEOS_DEPLOYMENT_TARGET" VisualEffectView.xcodeproj/project.pbxproj -B2 -A2Repository: efremidze/VisualEffectView
Length of output: 411
🏁 Script executed:
# Check if there are any comments or documentation about iOS version requirements
rg -i "ios.*version|deployment.*target|minimum.*ios" . --type swift --type markdown -lRepository: efremidze/VisualEffectView
Length of output: 84
🏁 Script executed:
cat -n CHANGELOG.md | head -50Repository: efremidze/VisualEffectView
Length of output: 2791
🏁 Script executed:
# Also check the README for any iOS version information
cat README.md | grep -i "ios\|requirement\|version" -A2 -B2Repository: efremidze/VisualEffectView
Length of output: 1011
Deployment target mismatch between Package.swift and Xcode project.
Package.swift declares .iOS(.v14) as the minimum platform, and the README states "iOS 14.0+" as a requirement, but the Xcode project sets IPHONEOS_DEPLOYMENT_TARGET = 18.6. This creates inconsistency: SPM users would expect iOS 14 support while Xcode project users would require iOS 18.6.
Align these values or clarify which is the actual minimum supported version.
🤖 Prompt for AI Agents
In VisualEffectView.xcodeproj/project.pbxproj around lines 349–356 the
IPHONEOS_DEPLOYMENT_TARGET is set to 18.6 which conflicts with Package.swift
(.iOS(.v14)) and the README (iOS 14.0+); make them consistent by choosing the
actual minimum supported iOS version and applying it across the repo: either
lower IPHONEOS_DEPLOYMENT_TARGET to 14.0 (and verify no APIs require a newer OS)
or update Package.swift and README to iOS 18.6; update the Xcode project build
settings (and any Info.plist/CI configs) accordingly and verify the project
builds for the chosen minimum.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Example/ContentView.swift (1)
5-5: Correct the copyright date.The date "8/14/25" (August 14, 2025) is in the future relative to the PR creation date. This appears to be a typo.
🔎 Proposed fix
-// Created by Lasha Efremidze on 8/14/25. +// Created by Lasha Efremidze on 12/29/25.
🧹 Nitpick comments (2)
Example/ContentView.swift (2)
12-138: LGTM! Consider adding a.systemBlurexample.The ContentView implementation is well-structured with clear sections, interactive controls, and good visual hierarchy. The custom blur examples effectively demonstrate parameter variations.
To provide a complete demonstration of the new style-based API, consider adding a section showcasing
.systemBlurstyle examples (e.g.,.systemMaterialLight,.systemMaterialDark), as the PR objectives mention three style options:.systemBlur,.customBlur, and.glass.
186-219: LGTM! Animation creates an engaging backdrop.The
AnimatedBackgroundimplementation usesTimelineViewwith smooth trigonometric motion to create an engaging animated gradient backdrop that effectively demonstrates the visual effect overlays.Note:
TimelineView(.animation)updates on every frame, which is appropriate for a demo app but may impact battery life. For production use cases with complex backgrounds, consider using.periodic(from:by:)with a lower update frequency.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Example/ContentView.swift
🧰 Additional context used
🧬 Code graph analysis (1)
Example/ContentView.swift (1)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)
value(37-39)
🔇 Additional comments (1)
Example/ContentView.swift (1)
130-130: Verify glass effect API syntax and iOS 26+ availability handling in VisualEffectView library.The code uses
.glass(.regular)which differs from standard SwiftUI.glassEffect()syntax mentioned in iOS 26 documentation. Cannot verify the exact API definition, iOS version requirement for this specific style, or fallback behavior without accessing the library source. Please confirm:
- Whether
.glass(.regular)is the correct API syntax for the library in use- The actual minimum iOS version requirement for this style
- Whether the library automatically handles fallbacks to earlier effects, or if availability checks are required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
31-40: Clarify whether.customBluris the default style for property-based customization.Lines 31–40 demonstrate setting custom blur properties (
colorTint,colorTintAlpha,blurRadius,scale) directly without explicitly assigning a style. However, line 84 states that these properties only work whenstyleis.customBlur.The documentation should explicitly clarify whether
.customBluris the default style for backward compatibility, so readers understand when property-based customization is active and how it relates to the style-based API.🔎 Suggested improvement
Add a clarifying note after line 86:
If you want `colorTintAlpha` to be different from `0`, make sure you always set it right after setting the `colorTint` or it may not be applied as expected. Don't set `colorTintAlpha` if `colorTint` is `nil`. +**Note:** The property-based approach (lines 31–40) uses the `.customBlur` style by default. For explicit style control, use the style-based API shown in lines 44–53.Also applies to: 84-86
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
🔇 Additional comments (2)
README.md (2)
117-123: SPM installation version has been corrected.The Swift Package Manager example now correctly references version
6.0.0, addressing the previous review feedback. 👍
10-10: Documentation updates align well with v6.0.0 feature set.The README now comprehensively covers:
- New style-based API (
.systemBlur,.customBlur,.glass) for both UIKit and SwiftUI- iOS 26+ glass effect support with appropriate fallback guidance
- Backward-compatible property-based customization
- App Store safety clarification for public APIs
The dual-API approach preserves backward compatibility while guiding users to the new style-based patterns. Examples are clear and well-organized.
Also applies to: 26-72, 139-139
This pull request introduces a major update (version 6.0.0) to the VisualEffectView library, focusing on adding support for iOS 26+ glass effects, a new style-based API, Swift 6 compatibility, and significant improvements to documentation and the SwiftUI interface. The update modernizes the API, clarifies usage for both UIKit and SwiftUI, and enhances the example app to demonstrate new features.
New Features and API Enhancements:
.systemBlur,.customBlur, and.glassoptions, allowing for more flexible and future-proof effect selection in both UIKit and SwiftUI.VisualEffectview to support the new style-based API and clarified that custom blur parameters only apply to.customBlurstyle.Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.