iOS小结

作者: 未知的远方 | 来源:发表于2018-12-10 16:54 被阅读8次
1,如何一次dismiss2个ViewController
        [self.presentingViewController.presentingViewController dismissViewControllerAnimated:true completion:^{
        }];
2,查看各种机型调用@2x还是@3x

@1x()
@2x(iPhone XR,iPhone SE,iPhone 6、iPhone 6s、iPhone 7、iPhone 8)
@3x(iPhone XS Max、iPhone XS,iPhone X,iPhone 8 Plus)

3,

- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath NS_AVAILABLE_IOS(7_0); 

返回的数值要大于1.0 ,不然报错
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'table view row height 
must not be negative - provided height for index path 
(<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}) is -1.000000'**
**libc++abi.dylib: terminating with uncaught exception of type NSException**

相关文章

网友评论

      本文标题:iOS小结

      本文链接:https://www.haomeiwen.com/subject/njyjfftx.html