DaisyYuimi / Week2-Yelp

0 stars 0 forks source link

Assignment 2 Review #1

Open avo1 opened 8 years ago

avo1 commented 8 years ago

:+1: Nice work. The primary challenge of this homework was to learn how to use UITableView to manage a complex form, establish communication between view controllers, and apply the correct Auto Layout constraints.

This was a challenging assignment, congrats on completing it successfully!

Grading Summary:

screen shot 2016-07-23 at 11 44 16 am screen shot 2016-07-23 at 6 49 34 pm
    var debounceTimer: NSTimer?
    // Search as you type?
    func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
        print("new text = \(searchBar.text!)")
        // Delay 0.5 seconds
        if let timer = debounceTimer {
            timer.invalidate()
        }
        searchTerm = searchBar.text!
        debounceTimer = NSTimer(timeInterval: 0.5, target: self, selector: Selector("searchNow"), userInfo: nil, repeats: false)
        NSRunLoop.currentRunLoop().addTimer(debounceTimer!, forMode: "NSDefaultRunLoopMode")
    }

    func searchNow() {
        // search
    }
screen shot 2016-07-23 at 7 12 08 pm
DaisyYuimi commented 8 years ago

Thank you. I'll improve it when I get a chance.