Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  IDColorDebugViewController.swift   Sprache: JAVA

 

import ThreemaFramework
import UIKit

final class IDColorDebugViewController: UIViewController {

    private let labelText = "Emily Yeung"
    
    private lazy var debugStackView: UIStackView = {
        let stack = UIStackView()
        
        for color in UIColor.IDColor.debugColors {
            let label = label(with: color)
            stack.addArrangedSubview(label)
            
            let line = line(with: color)
            stack.addArrangedSubview(line)
        }
        
        stack.axis = .vertical
        stack.alignment = .leading
        stack.spacing = 16
        stack.directionalLayoutMargins = NSDirectionalEdgeInsets(top: 24, leading: 24, bottom: 24, trailing: 24)
        stack.isLayoutMarginsRelativeArrangement = true
                    
        stack.backgroundColor = .chatBubbleReceived
        
        return stack
    }()
    
    private lazy var debugStackView2: UIStackView = {
        let stack = UIStackView()
        
        for color in UIColor.IDColor.debugColors {
            let label = label(with: color)
            stack.addArrangedSubview(label)
            
            let line = line(with: color)
            stack.addArrangedSubview(line)
        }
        
        stack.axis = .vertical
        stack.alignment = .leading
        stack.spacing = 16
        stack.directionalLayoutMargins = NSDirectionalEdgeInsets(top: 24, leading: 24, bottom: 24, trailing: 24)
        stack.isLayoutMarginsRelativeArrangement = true
               
        stack.backgroundColor = .chatBubbleSent
        
        return stack
    }()
    
    private lazy var containerStack = UIStackView(arrangedSubviews: [
        debugStackView,
        debugStackView2,
    ])
    
    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = .systemBackground

        let scrollView = UIScrollView()
        scrollView.addSubview(containerStack)
        view.addSubview(scrollView)
        
        containerStack.translatesAutoresizingMaskIntoConstraints = false
        scrollView.translatesAutoresizingMaskIntoConstraints = false
        
        NSLayoutConstraint.activate([
            containerStack.topAnchor.constraint(equalTo: scrollView.topAnchor),
            containerStack.leadingAnchor.constraint(equalTo: scrollView.leadingAnchor),
            containerStack.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor),
            containerStack.trailingAnchor.constraint(equalTo: scrollView.trailingAnchor),
            
            scrollView.topAnchor.constraint(equalTo: view.topAnchor),
            scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
            scrollView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
            scrollView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
        ])
    }
    
    private func label(with color: UIColor) -> UILabel {
        let label = UILabel()
        
        label.text = labelText
        label.textColor = color
        
        return label
    }
    
    private func line(with color: UIColor) -> UIView {
        let view = UIView()
        
        view.backgroundColor = color
        
        view.heightAnchor.constraint(equalToConstant: 2).isActive = true
        view.widthAnchor.constraint(equalToConstant: 100).isActive = true
        
        return view
    }
}

Messung
CHZG
849710093

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104842
#Domains=499165