func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{
var cell : UITableViewCell = .........
if(boolArray[indexPath.row){
cell.accessoryType = UITableViewCellAccessoryType.Checkmark
} else {
cell.accessoryType = UITableViewCellAccessoryType.None
}
}
Try this code.
Related Contents:
- How to reload tableview from another view controller in swift
- How to input currency format on a text field (from right to left) using Swift?
- How do you share data between view controllers and other objects in Swift?
- Importing CommonCrypto in a Swift framework
- iOS :How to get Facebook Album Photo’s Picker
- How to write a file to a folder located at Apple’s Files App in Swift
- How to play video with AVPlayerViewController (AVKit) in Swift
- Move TextField up when the keyboard has appeared in SwiftUI
- UIActivityViewController crashing on iOS 8 iPads
- Create thread safe array in Swift
- How to download file in swift?
- Sorting array alphabetically with number
- Move a view up only when the keyboard covers an input field
- How to play a local video with Swift?
- Add placeholder text inside UITextView in Swift?
- How do I get a plist as a Dictionary in Swift?
- Swift 4 “This class is not key value coding compliant”
- Playing a sound with AVAudioPlayer
- FCM background notifications not working in iOS
- Opening view controller from app delegate using swift
- UITextField’s numerical pad: dot instead of comma for float values
- How to Navigate from one View Controller to another using Swift
- Changing navigation bar color in Swift
- How to play a sound using Swift?
- Connect Objective-C framework to Swift iOS 8 app (Parse framework)
- ViewDidAppear is not called when opening app from background
- Comparing NSDates without time component
- Swift equivalent to `[NSDictionary initWithObjects: forKeys:]`
- NSURLConnection sendAsynchronousRequest can’t get variable out of closure
- Replacement for C-style loop in Swift 2.2
- How to format a Double into Currency – Swift 3
- Valid file path for archiverootobject and unarchiverootobject
- Swift nested class properties
- How to send data back by popViewControllerAnimated for Swift?
- Custom Alert (UIAlertView) with swift
- How to get data from firebase in descending order of value?
- Check if optional array is empty
- Static properties in Swift
- Query Available iOS Disk Space with Swift
- How to allow user to pick the image with Swift?
- How to convert an Int to Hex String in Swift
- How do you loop AVPlayer in Swift?
- UICollectionView header dynamic height using Auto Layout
- When to use takeUnretainedValue() or takeRetainedValue() to retrieve Unmanaged Objects in Swift?
- Find the tangent of a point on a cubic bezier curve
- Swift – Download a video from distant URL and save it in an photo album
- Rotating a view in layoutSubviews
- Center NSTextAttachment image next to single line UILabel
- When should translatesAutoresizingMaskIntoConstraints be set to true?
- When do I need to call setNeedsDisplay in iOS?