Wie Sie richtig hinzufügen eines UIImageView innerhalb einer UIStackView

Meine UIImageView geladen wird ein Bild mit einer hohen Auflösung. Wenn ich die UIImageView der UIStackView, die stack-Ansicht wird wachsen bis zu 1900x1200 dimension.
Die UIImageView contentMode eingestellt Aspekt zu Füllen.

Was kann ich tun, damit das Bild bleibt in seiner derzeitigen dimension (130x130), nachdem Sie diese in der übersicht ?

  • Fügen Sie Einschränkungen. Ihre Frage ist zu breit,...
  • [self addConstraint:[NSLayoutConstraint constraintWithItem:myUIImageVIew Attribut:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil-Attribut:NSLayoutAttributeNotAnAttribute Multiplikator:1.f Konstanten:130]]; [self addConstraint:[NSLayoutConstraint constraintWithItem:myUIImageVIew Attribut:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil-Attribut:NSLayoutAttributeNotAnAttribute Multiplikator:1.f Konstanten:130]];
InformationsquelleAutor Adrian | 2015-08-15
Schreibe einen Kommentar