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.
2列のNSTableViewがあります。各行のセルにテキストを入力するコードがあります。セルに入力できる文字数を最大 10 に制限する方法はありますか?
セル自身に NSString をカットするように指示することはできません。しかし、あなたはinputStringを切り取ることができます
cell.textLabel.text = [yourString substringToIndex:10];