Hallo zusammen,
Ich habe ein Collectionview und in einer der Cells habe ich einen weiteren Collectionview. Alles wird perfekt angezeigt ohne Probleme, bis ich mit NSLayoutconstraint.activate([constraints]) meine subviews in der Cell vom zweiten Collectionview anlegen möchte.
Meine CollectionViewCell Klasse sieht wie folgt aus:
Alles anzeigen
Sobald ich NSLayoutconstraint aufrufe bekomme ich folgenden Fehler:
Thread 1: signal SIGABRT
-[NSISEngine nsli_layoutEngine]: unrecognized selector sent to instance 0x10737e6b0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSISEngine nsli_layoutEngine]: unrecognized selector sent to instance 0x10737e6b0'
Ich hoffe ihr könnt mir helfen und vielen Dank schonmal !
Ich habe ein Collectionview und in einer der Cells habe ich einen weiteren Collectionview. Alles wird perfekt angezeigt ohne Probleme, bis ich mit NSLayoutconstraint.activate([constraints]) meine subviews in der Cell vom zweiten Collectionview anlegen möchte.
Meine CollectionViewCell Klasse sieht wie folgt aus:
Quellcode
- class UpcommingTimerCell: UICollectionViewCell {
- override init(frame: CGRect) {
- super.init(frame: frame)
- setupTimerIdLabel()
- }
- func setupTimerIdLabel(){
- self.addSubview(timerIdLabel)
- if #available(iOS 11.0, *) {
- NSLayoutConstraint.activate([
- timerIdLabel.topAnchor.constraint(equalTo: self.safeAreaLayoutGuide.topAnchor),
- timerIdLabel.leadingAnchor.constraint(equalTo: self.safeAreaLayoutGuide.leadingAnchor),
- timerIdLabel.trailingAnchor.constraint(equalTo: self.safeAreaLayoutGuide.trailingAnchor),
- timerIdLabel.heightAnchor.constraint(equalToConstant: 20)
- ])
- } else {
- // Fallback on earlier versions
- }
- }
Thread 1: signal SIGABRT
-[NSISEngine nsli_layoutEngine]: unrecognized selector sent to instance 0x10737e6b0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSISEngine nsli_layoutEngine]: unrecognized selector sent to instance 0x10737e6b0'
Ich hoffe ihr könnt mir helfen und vielen Dank schonmal !