Sto tentando di implementare un feed di notizie (in qualche modo come instagram senza commenti o Mi piace). Funziona, ma xcode continua a mostrare questo errore. Ho provato a cambiare tutti i vincoli, tuttavia, non riesco a lavorare. La vista tabella ha un'altezza di 475 e l'immagine ha l'altezza di 400, lasciando 75 per l'area bianca con etichette.Avviso di limitazione del ciclo di caricamento "Tentativo di ripristino interrotto"
ho usato
self.tableView.estimatedRowHeight = 475;
self.tableView.rowHeight = UITableViewAutomaticDimension;
Qualsiasi aiuto?
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x174096530 UIImageView:0x1743e9000.top == UITableViewCellContentView:0x17418af80.topMargin + 13>",
"<NSLayoutConstraint:0x1740977f0 V:[PFImageView:0x1743e8e00]-(0)-| (Names: '|':UITableViewCellContentView:0x17418af80)>",
"<NSLayoutConstraint:0x174097840 V:[UIImageView:0x1743e9000]-(24)-[PFImageView:0x1743e8e00]>",
"<NSLayoutConstraint:0x174097890 H:|-(0)-[PFImageView:0x1743e8e00] (Names: '|':UITableViewCellContentView:0x17418af80)>",
"<NSLayoutConstraint:0x174097930 H:[PFImageView:0x1743e8e00]-(0)-| (Names: '|':UITableViewCellContentView:0x17418af80)>",
"<NSLayoutConstraint:0x174097ac0 PFImageView:0x1743e8e00.width == PFImageView:0x1743e8e00.height>",
"<NSLayoutConstraint:0x174097b60 V:[UIImageView:0x1743e9000(30)]>",
"<NSLayoutConstraint:0x174092ed0 'UIView-Encapsulated-Layout-Width' H:[UITableViewCellContentView:0x17418af80(375)]>",
"<NSLayoutConstraint:0x174092f20 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x17418af80(44)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x174097b60 V:[UIImageView:0x1743e9000(30)]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Sembra che l'altezza di UIImageView sia eccessivamente limitata. Indaga sui vincoli che alterano l'altezza e dovresti trovare il problema. –
come indica @boyfarrell, ho fatto un breve schizzo dei tuoi vincoli e non sono quello che ti aspetti, probabilmente. ci sono solo 454punti di 475 rappresentati nell'asse Y, e l'asse x sarà largo 400pt se il PFImageVIew suppone avere la stessa larghezza/altezza. Anche se a quel punto, supererà i limiti di alcuni schermi. e una breve nota su autolayout: roba sembrerà che funzioni ancora nonostante questi messaggi, ma in realtà può causare risultati molto inaspettati. il sistema operativo sta facendo un'ipotesi, ma non è sempre l'ipotesi giusta –