我有一个从 NSDictionary 返回的 NSValue。NSValue 是使用sizeWithAttributes创建的。我想知道如何将 NSValue 恢复为可以使用它来创建标签大小的值。
我得到了由此计算的标签大小
betweensLabelSize = [betweensString sizeWithAttributes: @{
NSFontAttributeName: [UIFont systemFontOfSize:14.5f]
}];
我把它作为 NSValue 放入 NSDictionary 并像这样检索
NSValue *tempSize = [currAxisDictionary objectForKey:@"betweensLabelSize"];
返回此值
NSSize: {64.278503, 86.4925}