//
//  TSEmojisTutorialsVC.swift
//  AIEmoji
//
//  Created by 100Years on 2025/1/22.
//

class TSEmojisTutorialsVC: TSBaseVC {

    lazy var scrollView: UIScrollView = {
        let scrollView = UIScrollView()
        scrollView.backgroundColor = .clear
        scrollView.translatesAutoresizingMaskIntoConstraints = false
        scrollView.backgroundColor = .clear
        scrollView.frame = self.contentView.bounds
        scrollView.contentSize = imageView.size
        return scrollView
    }()
    
    lazy var imageView: UIImageView = {
        let imageView = UIImageView.createImageView(imageName: "emojis_tutorials",contentMode: .scaleToFill)
        // 计算图片的实际高度
        let imageWidth = imageView.image?.size.width ?? k_ScreenWidth
        let imageHeight = imageView.image?.size.height ?? k_ScreenHeight
    
        let w = k_ScreenWidth-32
        let scale = w / imageWidth
        let scaledHeight = imageHeight * scale
        imageView.frame = CGRectMake(16, 8, w, scaledHeight)
        return imageView
    }()
    
    override func createView() {
        addNormalNavBarView()
        setPageTitle("How to use?".localized)
        contentView.addSubview(scrollView)
        scrollView.addSubview(imageView)
    }
}
