gpt4 book ai didi

ios - 我的数据格式有什么问题?

转载 作者:行者123 更新时间:2023-11-29 10:57:15 26 4
gpt4 key购买 nike

我正在使用一个教程应用程序作为引用,我正在尝试制作一个应用程序,将鞋码从美国鞋码转换为以下其他国家/地区:欧洲、英国和日本。

我的 ViewController.m 文件中弹出警告:

Data argument not used by format string

关于以下代码:

NSString *resultString = [[NSString alloc] initWithFormat: @"3f USS = 3f @", size, result, _countryNames[row]];

当我运行该应用程序时,我的调试区会弹出以下内容:

2013-07-15 10:50:07.377 ShoeSizeConverter[9617:c07] -[UIView numberOfComponentsInPickerView:]: unrecognized selector sent to instance 0x7170c10
2013-07-15 10:50:07.379 ShoeSizeConverter[9617:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView numberOfComponentsInPickerView:]: unrecognized selector sent to instance 0x7170c10'
*
First throw call stack: (0x1c92012 0x10cfe7e 0x1d1d4bd 0x1c81bbc 0x1c8194e 0xc634 0xd25f 0x642dd 0x10e36b0 0x228efc0 0x228333c 0x228eeaf 0x1032bd 0x4bb56 0x4a66f 0x4a589 0x497e4 0x4961e 0x4a3d9 0x4d2d2 0xf799c 0x44574 0x4476f 0x44905 0x4d917 0x1196c 0x1294b 0x23cb5 0x24beb 0x16698 0x1beddf9 0x1bedad0 0x1c07bf5 0x1c07962 0x1c38bb6 0x1c37f44 0x1c37e1b 0x1217a 0x13ffc 0x1ecd 0x1df5) libc++abi.dylib: terminate called throwing an exception

最佳答案

I have a warning that pops up in my ViewController.m file stating "Data argument not used by format string" on the following code:

您需要在格式说明符前添加百分号。而不是 3f,您需要 %3f 等等。所以你的格式字符串应该是:

@"%3f USS = %3f %@"

关于ios - 我的数据格式有什么问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17657958/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com