fix(character-detail) 캐릭터 상세
- 화면이 좌우로 길어지면서 잘리던 버그 수정
This commit is contained in:
		@@ -6,6 +6,7 @@
 | 
				
			|||||||
//
 | 
					//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import SwiftUI
 | 
					import SwiftUI
 | 
				
			||||||
 | 
					import Kingfisher
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct CharacterDetailView: View {
 | 
					struct CharacterDetailView: View {
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -167,17 +168,11 @@ extension CharacterDetailView {
 | 
				
			|||||||
extension CharacterDetailView {
 | 
					extension CharacterDetailView {
 | 
				
			||||||
    private var characterImageSection: some View {
 | 
					    private var characterImageSection: some View {
 | 
				
			||||||
        // 배경 이미지
 | 
					        // 배경 이미지
 | 
				
			||||||
        AsyncImage(url: URL(string: viewModel.characterDetail?.imageUrl ?? "https://picsum.photos/400")) { image in
 | 
					        KFImage(URL(string: viewModel.characterDetail?.imageUrl ?? "https://picsum.photos/400"))
 | 
				
			||||||
            image
 | 
					            .resizable()
 | 
				
			||||||
                .resizable()
 | 
					            .scaledToFill()
 | 
				
			||||||
                .aspectRatio(contentMode: .fill)
 | 
					            .frame(width: screenSize().width, height: screenSize().width, alignment: .top)
 | 
				
			||||||
        } placeholder: {
 | 
					            .clipped()
 | 
				
			||||||
            Rectangle()
 | 
					 | 
				
			||||||
                .fill(Color.gray)
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        .frame(maxWidth: .infinity)
 | 
					 | 
				
			||||||
        .frame(height: screenSize().width)
 | 
					 | 
				
			||||||
        .clipped()
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -190,6 +185,8 @@ extension CharacterDetailView {
 | 
				
			|||||||
                Text(viewModel.characterDetail?.name ?? "")
 | 
					                Text(viewModel.characterDetail?.name ?? "")
 | 
				
			||||||
                    .font(.custom(Font.preBold.rawValue, size: 26))
 | 
					                    .font(.custom(Font.preBold.rawValue, size: 26))
 | 
				
			||||||
                    .foregroundColor(.white)
 | 
					                    .foregroundColor(.white)
 | 
				
			||||||
 | 
					                    .lineLimit(1)
 | 
				
			||||||
 | 
					                    .truncationMode(.tail)
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                if let characterType = viewModel.characterDetail?.characterType {
 | 
					                if let characterType = viewModel.characterDetail?.characterType {
 | 
				
			||||||
                    HStack(spacing: 8) {
 | 
					                    HStack(spacing: 8) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,6 +28,8 @@ struct DetailNavigationBar: View {
 | 
				
			|||||||
                Text(title)
 | 
					                Text(title)
 | 
				
			||||||
                    .font(.custom(Font.preBold.rawValue, size: 18.3))
 | 
					                    .font(.custom(Font.preBold.rawValue, size: 18.3))
 | 
				
			||||||
                    .foregroundColor(.grayee)
 | 
					                    .foregroundColor(.grayee)
 | 
				
			||||||
 | 
					                    .lineLimit(1)
 | 
				
			||||||
 | 
					                    .truncationMode(.tail)
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            Spacer()
 | 
					            Spacer()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user