Home > Software engineering >  The size of system images cannot be increased
The size of system images cannot be increased

Time:07-19

can you let me know what seems to be the problem with my system images here? why size cannot be increased no matter what?

i have two images in this view. both images are chair images aka "chair.lounge.fill". i tried increasing frame still not work. Thank you for your time.

  @ObservedObject var cinema = Cinema()

 var body: some View {
    VStack() {
        HStack() {
            Image(systemName: "chair.lounge.fill")
                .aspectRatio(contentMode: .fit)
                .frame(width: 100, height: 100)
            Text("Special Seats")
        }
        .foregroundColor(.brown)
        HStack() {
            Image(systemName: "chair.lounge.fill")
                .aspectRatio(contentMode: .fit)
                .frame(width: 100, height: 100)
            Text("Available Seats")
        }
        .foregroundColor(.blue)
    }
    .frame(maxWidth: .infinity, maxHeight: .infinity)
    .background(.black)
}

CodePudding user response:

Your code and system images are fine just add .resizable() after your Image() to solve this problem.

  • Related