developing alarm repeating days list
<p>I want to make a repeat list like in the picture below for my alarm app in swift, I've tried my best but all my attempts have failed, how I can do it, how I can save multiple values in one attributes in database, do I need array, how i can do check list; my project is almost complete, the only thing left is repeat list which I failed to make it</p>

<p>thanks in advance</p>

<p><strong>Reminder.swift</strong></p>

<pre><code>verride func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {


       if segue.identifier == "presentDay" {

            if let daysPickerVie

wController = segue.destinationViewController as? Days {
            let path = tableView.indexPathForSelectedRow
            detailLabel.text = daysPickerViewController.days[(path?.row)!]
        }
    }
}
</code></pre>

<p><strong>Days.swift</strong></p>

<pre><code>class Days: UITableViewController
{
    var lastSelectedIndexPath = NSIndexPath(forRow: -1, inSection: 0)

    let days = [
        "Everyday",
        "Saturday",
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"]


     var selectedDay:String?
     var selectedDayIndex:Int?
     var cell:UITableViewCell?


    override func viewDidLoad() {
      //navigationController?.navigationBar.topItem?.title = "Back"
    }

extension Days{


    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
        return days.count
        }

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
            let cell = tableView.dequeueReusableCellWithIdentifier("daySelected", forIndexPath: indexPath) as UITableViewCell


    cell.accessoryType = .None
    cell.textLabel?.text = days[indexPath.row]
    selectedDay = days[indexPath.row]
    return cell
    }
}

extension Days {


        override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {


            if let cell = tableView.cellForRowAtIndexPath(indexPath) {
                if cell.selected {
                    cell.accessoryType = .Checkmark
                }
              }

        }
    override func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {


            if let cell = tableView.cellForRowAtIndexPath(indexPath) {
                cell.accessoryType = .None
            }


        }

    }
</code></pre>

<p><a href="https://i.stack.imgur.com/ttVVQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ttVVQ.png" alt="enter image description here"></a></p>