diff --git a/.gitignore b/.gitignore index 0023a53..88086dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store /.build +/build /Packages xcuserdata/ DerivedData/ diff --git a/LICENSE.md b/LICENSE.md index 1411d1a..28e6cbd 100755 --- a/LICENSE.md +++ b/LICENSE.md @@ -21,4 +21,6 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. + +Autor: Daniel Arantes Loverde diff --git a/Package.resolved b/Package.resolved index 2fb4298..8496dfb 100644 --- a/Package.resolved +++ b/Package.resolved @@ -3,8 +3,8 @@ "pins" : [ { "identity" : "lcecryptokitbinary", - "kind" : "localSourceControl", - "location" : "/Users/loverde_co/Documents/Loverde_JOBs/Producao/Loverde Co/GIT/XCODE/Repositorios/LCECryptoKit/PrivateLib/LCECryptoKitBinary", + "kind" : "remoteSourceControl", + "location" : "https://60c260c85d3a2fe840411b0ff98f521b5eca3c56@git.loverde.com.br/Loverde-Company-LTDA/LCECryptoKitBinary.git", "state" : { "revision" : "2c5c47cebef40a8adc5557d071a35be405c05e30", "version" : "1.0.2" diff --git a/Package.swift b/Package.swift index b9103d8..56de91b 100644 --- a/Package.swift +++ b/Package.swift @@ -2,7 +2,7 @@ import PackageDescription import Foundation -let isLocalDevelopment = FileManager.default.fileExists(atPath: "../LCECryptoKit/PrivateLib/LCECryptoKitBinary") +let isLocalDevelopment = false //FileManager.default.fileExists(atPath: "../LCECryptoKit/PrivateLib/LCECryptoKitBinary") let enableCryptoBinary = ProcessInfo.processInfo.environment["LCE_ENABLE_CRYPTO_BINARY"] != "0" let cryptoPackageURL = isLocalDevelopment diff --git a/README.md b/README.md index 44a04f3..50143be 100644 --- a/README.md +++ b/README.md @@ -59,12 +59,11 @@ And then import `LCEssentials ` wherever you import UIKit or SwiftUI import LCEssentials ``` -Author: ----- - Any question or doubts, please send thru email Daniel Arantes Loverde - [![Alt text](https://loverde.com.br/_signature/loverde_github_mail.gif "My Resume")](https://github.com/loverde-co/resume/) [![Alt text](https://loverde.com.br/_signature/loverde_github_mail.gif "Loverde Co. Github")](https://github.com/loverde-co) + +Autor: Daniel Arantes Loverde diff --git a/Sources/LCEssentials/SwiftUI/LCENavigationView.swift b/Sources/LCEssentials/SwiftUI/LCENavigationView.swift index 3acad1a..44bf3dc 100644 --- a/Sources/LCEssentials/SwiftUI/LCENavigationView.swift +++ b/Sources/LCEssentials/SwiftUI/LCENavigationView.swift @@ -47,6 +47,8 @@ class LCENavigationState: ObservableObject { @Published var title: (any View) = Text("") /// The subtitle view of the navigation bar. @Published var subTitle: (any View) = Text("") + /// The background color of the navigation bar. + @Published var navigationBarBackgroundColor: Color = .clear } /// `LCENavigationView` is a SwiftUI `View` that provides a customizable navigation bar. @@ -79,7 +81,7 @@ public struct LCENavigationView: View { /// The body of the `LCENavigationView`. public var body: some View { - VStack { + VStack(spacing: 0) { if !state.hideNavigationBar { NavigationBarView } @@ -100,7 +102,7 @@ public struct LCENavigationView: View { .font(.headline) .padding() .background { - Color.clear.ignoresSafeArea(edges: .top) + state.navigationBarBackgroundColor.ignoresSafeArea(edges: .top) } } @@ -217,6 +219,14 @@ public struct LCENavigationView: View { state.hideNavigationBar = hide return self } + + /// Sets the background color for the navigation bar. + /// - Parameter color: The color to use as the navigation bar background. + /// - Returns: The `LCENavigationView` instance for chaining. + public func setNavigationBarBackgroundColor(_ color: Color) -> LCENavigationView { + state.navigationBarBackgroundColor = color + return self + } } /// Extension to `FormatStyle` to format any value as a string.