Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/99.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios -[UICTFont_scaledValueForValue:]中的断言失败;_Ios_Objective C_Ios8_Uifont - Fatal编程技术网

Ios -[UICTFont_scaledValueForValue:]中的断言失败;

Ios -[UICTFont_scaledValueForValue:]中的断言失败;,ios,objective-c,ios8,uifont,Ios,Objective C,Ios8,Uifont,在将我的应用升级到iOS 8的过程中,我遇到了一个奇怪的问题,这似乎只发生在iOS 8上。每当我使用外观API设置UITableViewHeaderFooterView的标题文本属性时,我都会遇到以下断言失败: ***在-[UICTFont\u scaledValueForValue:]、/SourceCache/UIFoundation\u Sim/UIFoundation-371/UIFoundation/iOS/UIFont.m:496中的断言失败 我用来设置属性的代码如下: [[UILa

在将我的应用升级到iOS 8的过程中,我遇到了一个奇怪的问题,这似乎只发生在iOS 8上。每当我使用外观API设置UITableViewHeaderFooterView的标题文本属性时,我都会遇到以下断言失败:

***在-[UICTFont\u scaledValueForValue:]、/SourceCache/UIFoundation\u Sim/UIFoundation-371/UIFoundation/iOS/UIFont.m:496中的断言失败

我用来设置属性的代码如下:

[[UILabel AppearanceWhen contained in:[UITableViewHeaderFooterView类],nil]setFont:[UIFont fontWithName:@Helvetica size:17]

正如你所看到的,它非常简单,没有什么特别之处

下面是我得到的堆栈跟踪的相关部分:

这个问题有一个解决方案,但自beta 3以来没有任何回应。我目前使用的是Xcode 6.0.1,使用的是最新的iOS 8公开发行版。如果有人知道发生了什么,我们将非常感谢您的任何见解。

可能重复的
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 
'scaledValueForValue: called on a font that doesn't have a text style set'
*** First throw call stack:
(
  0   CoreFoundation                      0x00000001105ef3f5 __exceptionPreprocess + 165
  1   libobjc.A.dylib                     0x0000000110288bb7 objc_exception_throw + 45
  2   CoreFoundation                      0x00000001105ef25a +[NSException raise:format:arguments:] + 106
  3   Foundation                          0x000000010e75c28f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
  4   UIFoundation                        0x0000000113055b5b -[UIFont _scaledValueForValue:] + 241
  5   UIKit                               0x000000010f67d0d6 -[UITableViewHeaderFooterView _labelFrame] + 1517
  6   UIKit                               0x000000010f67f4ed -[UITableViewHeaderFooterView layoutSubviews] + 220
  7   UIKit                               0x000000010f05d199 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
  8   QuartzCore                          0x000000010ee6ff98 -[CALayer layoutSublayers] + 150