Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using CheckMark in swift

Tags:

swift

How to use the method in UITableViewCellAcessoryCheckMark swift? In ObjC it is clear to me, but Swift could not do likewise. My intention is to make a comparison, and this being true chekmark appear.

like image 513
Vinícius Soler Avatar asked Dec 02 '25 17:12

Vinícius Soler


1 Answers

In Swift, to reference UITableViewCellAccessoryCheckMark use

cell.accessoryType = UITableViewCellAccessoryType.Checkmark

Here's the Apple docs: https://developer.apple.com/library/prerelease/iOS/documentation/UIKit/Reference/UITableViewCell_Class/index.html#//apple_ref/swift/enum/UITableViewCellAccessoryType

In Swift 4/5,

cell.accessoryType = UITableViewCell.AccessoryType.checkmark
like image 105
YarGnawh Avatar answered Dec 05 '25 10:12

YarGnawh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!