SwiftUI basis of the function by updating the page

SwiftUI basis of the function by updating the page

With the increasing complexity of the page, we need to interface code modular processing. Here is a simple demo

Code

import SwiftUI

struct ListImageView: View {
    var body: some View {
        List{
            self.makeRow()
        }
    }
    func makeRow() -> some View{
        Text("hello")
    }
}

effect

41085-7e93175208d1430c.png
SwiftUI basis of the function by updating the page

More attention SwiftUI tutorials and code columns

Published 637 original articles · won praise 4 · views 50000 +

Guess you like

Origin blog.csdn.net/iCloudEnd/article/details/104068348