xcode报[__NSCFConstantString pointSize]错误分析
来源:互联网 发布:win10wlan找不到网络 编辑:程序博客网 时间:2024/06/03 18:13
NSString*contentStr=@"字符串长度或者高度的计算";
CGFloat heigt=[contentStrboundingRectWithSize:CGSizeMake(cell.contenTLable.frame.size.width,100000) options:\
NSStringDrawingTruncatesLastVisibleLine |
NSStringDrawingUsesLineFragmentOrigin |
NSStringDrawingUsesFontLeadingattributes:@{NSFontAttributeName:@"8"}context:nil].size.height+15;
在运行的时候一直报这个错
-[__NSCFConstantString pointSize]: unrecognized selector sent to instance 0x10eabb678
后来找出原因是这里的错@{NSFontAttributeName: @"8"},不能直接写数字,而是要写成NSFont型正确写法是
@{NSFontAttributeName:[UIFontsystemFontOfSize:12]}
这个错误很不容易发现,以后得多注意这些个小细节 0 0
- xcode报[__NSCFConstantString pointSize]错误分析
- Xcode编译错误__NSCFConstantString
- Xcode报png图片格式错误
- Xcode编译报 LaunchServicesError 0.错误
- xcode中使用opencv报各种错误
- Xcode 错误、报错、警告集锦
- Xcode报referenced from错误的总结
- [__NSCFConstantString size]: unrecognized selector sent to instance 错误
- 关于Xcode的错误分析和处理
- 关于Xcode的错误分析和处理
- xCode中常见的错误分析
- __NSCFConstantString alignmentRectInsets
- Xcode中添加图片文件报如下错误解…
- Xcode更新到6.3之后,NSFileTypeForHFSTypeCode报了三个错误
- Xcode报Invalid bitcode signature错误的解决方案
- iOS编译错误:[__NSCFConstantString count]: unrecognized selector sent to instance 0x1ada02c
- Xcode运行时候报路径错误和编译错误时及莫名其妙系列错误时
- nginx+uwsgi+django报502错误分析
- txt转换成pdf格式的详细教程
- R中的多维数组和矩阵
- iOS开发UI篇—使用storyboard创建导航控制器以及控制器的生命周期
- 如何正确配置Nginx+PHP
- failed to install service or service already installed
- xcode报[__NSCFConstantString pointSize]错误分析
- java中二进制转换为字节数组
- iOS 尺寸规范
- Android之内存溢出(Out Of Memory)的总结
- Androidndk开发打包时我们应该如何注意平台的兼容(x86,arm,arm-v7a)
- iOS开发UI篇—UIWindow简单介绍
- 从内存中正/反向查找特定字符串,字符串替换的2种方法
- iOS开发UI篇—控制器的创建
- C++Primer第五版 练习11.12(解答)