[Framework] Feed list view in the Feed framework (#9)
This PR contains the work done to provide the existing `FeedViewController` view controller with real life data by integrating the `iTunesService` service into its view model. In addition, the list item cell has been design has been updated, and re-implemented using the `SwiftUI` framework. Reviewed-on: rock-n-code/app-reviews#9 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #9.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// FullWidthModifier.swift
|
||||
// ReviewsUIKit
|
||||
//
|
||||
// Created by Javier Cicchelli on 19/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct FullWidthModifier: ViewModifier {
|
||||
|
||||
// MARK: Constants
|
||||
private let alignment: Alignment
|
||||
|
||||
// MARK: Initialisers
|
||||
init(alignment: Alignment) {
|
||||
self.alignment = alignment
|
||||
}
|
||||
|
||||
// MARK: Functions
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.frame(
|
||||
maxWidth: .infinity,
|
||||
alignment: alignment
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
#Preview {
|
||||
Group {
|
||||
Text("Hello, world!")
|
||||
.modifier(FullWidthModifier(alignment: .leading))
|
||||
Text("Hello, world!")
|
||||
.modifier(FullWidthModifier(alignment: .center))
|
||||
Text("Hello, world!")
|
||||
.modifier(FullWidthModifier(alignment: .trailing))
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
Reference in New Issue
Block a user