1

I have converted my existing Xib UI in SwiftUI.

Is it possible to use SwiftUI in existing UITableView and UICollectionView?

Here is the code i have done in SwiftUI

struct LandmarkList: View {
    @EnvironmentObject var userData: UserData

    var body: some View {
        VStack(alignment: .leading) {
            Text("Pinkesh Gjr")
                .font(.title)
            HStack(alignment: .top) {
                Text("iOS Developer")
                    .font(.subheadline)
                Spacer()
                Text("California")
                    .font(.subheadline)
            }
        }
    }
}
PinkeshGjr
  • 8,460
  • 5
  • 41
  • 56

0 Answers0