简体   繁体   English

Objective-C中的下标

[英]Subscripts in Objective-C

I am working on an iPhone app and I have cells of a UITableView. 我正在使用iPhone应用程序,并且具有UITableView的单元格。 I want some of the cells to have subscripts of "f" and "0". 我希望某些单元格具有下标“ f”和“ 0”。 Is there anyway to do this, maybe using unicode or something? 无论如何,也许使用unicode或其他方法来做到这一点?

UILabels, which is what the standard UITableViewCells use to display the data cannot contain subscripts. UILabels(标准UITableViewCells用于显示数据)不能包含下标。

It sounds like what you need to do is to create your own class, based on UITableViewCell, I'm which you can lay the text out in a way that better suits you, and use those cells in your UITableView. 听起来您需要做的是基于UITableViewCell创建自己的类,我可以用一种更适合您的方式来布置文本,并在UITableView中使用这些单元格。

It is easy to create a class based on UITableCellView directly in XCode, including a XIB, which can be visually edited right in Interface Builder. 直接在XCode中创建基于UITableCellView的类很容易,其中包括XIB,可以在Interface Builder中直接对其进行可视化编辑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM