Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS UITableViewCell accessory on the left side?

For my app, I want a number of cells that can have both a checkmark and a detail disclosure button. That is, I want them to appear exactly like the Wi-Fi network selection in the iOS settings: checkmark on the left side, content in the middle, and detail disclosure button on the right.

Is there a proper way to do this, or am I supposed to just use an image of a checkmark in the image part of the cell content? If you know of any sample code doing this sort of thing, please point me to it.

like image 607
SeanR Avatar asked Jan 30 '11 05:01

SeanR


People also ask

What is accessory view iOS?

Published by Kelvin Tan on October 30, 2019. Input Accessory View is a toolbar that appears above your keyboard which gives user additional action. The image below shows several button which appears as an image which will trigger an action when clicked on.

What is accessory view?

The view to use on the right side of the cell, typically as a control, in the table view's normal state. iOS 2.0+ iPadOS 2.0+ Mac Catalyst 13.0+ tvOS 9.0+


1 Answers

The standard styles for UITableViewCell do not include one that works as you want, so you'll have to do this yourself by manually adding a subview to the cell.

You could use the example here as a starting point.

like image 60
Jason Foreman Avatar answered Sep 22 '22 03:09

Jason Foreman