Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 A UIView 中将条形码字符串(例如:1001847983)显示到条形码图像中。iPhone SDK 是否支持条形码字体?我不需要阅读条形码,我只想在条形码行中显示字符串。
了解如何将自定义字体添加到您的应用程序
我可以在 iPhone 应用程序中嵌入自定义字体吗?
然后给自己找个条码字体
http://www.google.com/search?q=barcode+fonts
不,没有显示条形码的内置方式。您必须创建一个自定义视图来自己转换和显示它们。最简单的方法可能是使每条黑线成为不透明的空 UIView 并将其中的许多带有正确帧的 UIView 子类添加到 UIView 子类中。
内置的 iPhone 字体在这里:
http://daringfireball.net/2007/07/iphone_fonts