Otrzymuję ten błąd w moim kodzie, który mówi "Utwórz symboliczny punkt przerwania pod UICollectionViewFlowLayoutBreakForInvalidSizes
, aby złapać to w debugerze." Jestem zdezorientowany co do tego, o co właściwie pyta się tutaj, kod, w którym myślę, że jest to pytanie, które należy umieścić w nie wiem gdzie?Złóż symboliczny punkt przerwania na 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)
}
}
Ok idealny więc to zrobiłem i uruchomił aplikację ponownie ładując stronę na Facebooku, ale kiedy kliknę, aby dodać zdjęcie, po prostu odświeża stronę dobrze zrobiła przed teraz po prostu wyciąga to w Xcode: –
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; symbol stub dla: NSLog –
@ThreeSuitStudiosLLC czy wiesz, jak rozpoznać uchwyty pamięci? – Jobs