Skip to content
Snippets Groups Projects
ScanContainerView.swift 690 B
Newer Older
Bruno Muniz's avatar
Bruno Muniz committed
import UIKit
import Shared

final class ScanContainerView: UIView {
    let scrollView = UIScrollView()
    let segmentedControl = SegmentedControl()

    init() {
        super.init(frame: .zero)

Ahmed Shehata's avatar
Ahmed Shehata committed
        backgroundColor = Asset.neutralDark.color
Bruno Muniz's avatar
Bruno Muniz committed
        addSubview(segmentedControl)
        addSubview(scrollView)

Ahmed Shehata's avatar
Ahmed Shehata committed
        scrollView.snp.makeConstraints {
            $0.edges.equalToSuperview()
Bruno Muniz's avatar
Bruno Muniz committed
        }

Ahmed Shehata's avatar
Ahmed Shehata committed
        segmentedControl.snp.makeConstraints {
            $0.top.equalTo(safeAreaLayoutGuide).offset(10)
            $0.left.equalToSuperview()
            $0.right.equalToSuperview()
            $0.height.equalTo(60)
Bruno Muniz's avatar
Bruno Muniz committed
        }
    }
Ahmed Shehata's avatar
Ahmed Shehata committed

    required init?(coder: NSCoder) { nil }
Bruno Muniz's avatar
Bruno Muniz committed
}