Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions WatchNotes WatchKit Extension/InterfaceController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class InterfaceController: WKInterfaceController,NSFilePresenter {

var notes :NSMutableArray?

override init(context: AnyObject?) {
override init() {
// Initialize variables here.
super.init(context: context)
super.init()

NSFileCoordinator.addFilePresenter(self)

Expand Down Expand Up @@ -60,7 +60,7 @@ class InterfaceController: WKInterfaceController,NSFilePresenter {

for (index,value) in enumerate(self.notes!) {

let row = self.tableView?.rowControllerAtIndex(index) as NotesTableRowController
let row = self.tableView?.rowControllerAtIndex(index) as! NotesTableRowController

row.noteTitleLabel?.setText(value as? String)

Expand Down
6 changes: 3 additions & 3 deletions WatchNotes/NotesTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class NotesTableViewController: UITableViewController,UITextFieldDelegate,NSFile
}
else {

self.notes = NSKeyedUnarchiver.unarchiveObjectWithData(savedData!) as NSMutableArray
self.notes = NSKeyedUnarchiver.unarchiveObjectWithData(savedData!) as! NSMutableArray
}

}
Expand Down Expand Up @@ -140,9 +140,9 @@ class NotesTableViewController: UITableViewController,UITextFieldDelegate,NSFile

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

let cell = tableView.dequeueReusableCellWithIdentifier("NoteCell", forIndexPath: indexPath) as UITableViewCell
let cell = tableView.dequeueReusableCellWithIdentifier("NoteCell", forIndexPath: indexPath) as! UITableViewCell

var note = self.notes[indexPath.row] as String
var note = self.notes[indexPath.row] as! String

cell.textLabel?.text = note

Expand Down