- Your application has presented a UIAlertController (<UIAlertController: 0x13f454ac0>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.
分析:該崩潰發(fā)于在ipad 上面
原因:使用了UIAlertController 的sheet 特性控件,在ipad上運(yùn)行的時(shí)候
2. tableView 的reloadSections 刷新方法崩潰:
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:2] withRowAnimation:UITableViewRowAnimationNone];
崩潰堆棧信息:
[UITableView(FDTemplateLayoutCellAutomaticallyCacheInvalidation) fd_reloadSections:withRowAnimation:] [UITableView+FDTemplateLayoutCell.m : 345]
Exception Name: NSInternalInconsistencyException
Exception Reason: Invalid update: invalid number of rows in section 3. The number of rows contained in an existing section after the update (0) must be equal to the number of rows contained in that section before the update (3), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).
大概意思是說(shuō)某個(gè)section 更新前后rows個(gè)數(shù)不一致
總結(jié):在使用reloadSections 方法的時(shí)候一定要小心跷坝,保證當(dāng)前section內(nèi)的rows 前后一致沿腰,如果該section的rows是動(dòng)態(tài)的捆憎,那么還是乖乖的用reloadData 刷新視圖玲销,改方法會(huì)從新計(jì)算section 的個(gè)數(shù)兴想,以及相應(yīng)的rows
[self.tableView reloadData];
tableView的崩潰問(wèn)題還挺多的岳遥,可以參考 開(kāi)發(fā)中遇到的坑 里面提到的關(guān)于tableView 的一些崩潰問(wèn)題;