2016-05-29 5 views
7

Ich bekomme diesen Fehler in meinem Code sagt es zu "Erstellen Sie einen symbolischen Haltepunkt um UICollectionViewFlowLayoutBreakForInvalidSizes, um dies im Debugger zu fangen." Ich bin verwirrt darüber, was es eigentlich hier fragt, ist der Code, in dem ich denke, dass es darum bittet, dass man es einfach nicht genau weiß, wo?Erstellen Sie einen symbolischen Haltepunkt bei UICollectionViewFlowLayoutBreakForInvalidSizes

import UIKit 

// MARK: - CUSTOM SOCIAL CELL 
class SocialCell:UICollectionViewCell { 

    /* Views */ 
    @IBOutlet weak var socialIcon: UIImageView! 
    @IBOutlet weak var socialLabel: UILabel! 
} 

class SocialList: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout { 

    /* Views */ 
    @IBOutlet weak var socialCollView: UICollectionView! 

    override func viewDidLoad() { 
     super.viewDidLoad() 

    } 

    // MARK: - COLLECTION VIEW DELEGATES 
    func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { 
     return 1 
    } 

    func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 
     return socials.count //socialNames.count 
    } 

    func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { 
     let cell = collectionView.dequeueReusableCellWithReuseIdentifier("SocialCell", forIndexPath: indexPath) as! SocialCell 

     cell.socialLabel.text = "\(socials[indexPath.row]["name"]!)" 
     cell.socialIcon.image = UIImage(named: "\(socials[indexPath.row]["name"]!)") 

     return cell 
    } 

    func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize { 
     return CGSizeMake(view.frame.size.width/3.8, view.frame.size.width/3.8) 
    } 

    func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { 
     selectedSocial = "\(socials[indexPath.row]["link"]!)" 
     selectedName = "\(socials[indexPath.row]["name"]!)" 
     selectedColor = socialColors[indexPath.row] 

     navigationController?.popViewControllerAnimated(true) 
    } 
} 

Antwort

26

Sie können diese systematisch lösen, indem Sie diese:

Außerdem sollten Sie Ihre vollständigen Fehler teilen, so dass ich Ihnen spezifischere Problem führen kann. Mein Denken ist, dass Sie irgendeine Art von autolayout Problem in Ihrem UICollectionView haben

Auf der linken Seite des Projektes, klicken Sie auf das Break Point Navigator

enter image description here

Hier klicken Sie auf der Plus-Taste auf der Unterseite links und Symbolische klicken Haltepunkt hinzufügen

enter image description here

Dann wird ein Popup angezeigt. In UICollectionViewFlowLayoutBreakForInvalidSizes dort wie so

enter image description here

Danach wird nur die Eingabetaste drücken (auf der Tastatur) und auf eine beliebige Stelle

Code ausführen und sehen, wo das Projekt

+0

Ok perfekt, so stoppt ich tat, und lief die app wieder seine laden die Facebook-Seite, aber wenn ich ein Foto hinzufügen, es nur aktualisiert die Seite gut es vorher getan hat es jetzt nur in Xcode: –

+2

UIKit'UICollectionViewFlowLayoutBreakForInvalidSizes: -> 0x1123ebabc <+0>: pushq% RBP 0x1123ebabd <+1>: movq% RSP% RBP 0x1123ebac0 <+4>: TestQ% RDI,% RDI 0x1123ebac3 <+7>: je 0x1123ebac7; <+11> 0x1123ebac5 <+9>: popq% RBP 0x1123ebac6 <+10>: retq 0x1123ebac7 <+11>: leaq 0x4a1042 (% rip), RDI%; @ "‘ ‚“ 0x1123ebace <+18>: xorl% eax,% eax 0x1123ebad0 <+20>: popq% rbp 0x1123ebad1 <+21>: jmp 0x1125b3e90; Stub für: NSLog –

+1

@ThreeSuitStudiosLLC haben Sie herausgefunden, wie Sie die Speicherzugriffe sinnvoll machen? – Jobs

Verwandte Themen