Store Search p.163 Exercise

I am trying to figure out a way to update labels size with dynamic type in storeResultCell.
I did the constraints for storeResultCell and implemented notification method in app delegate like so :

let UIContentSizeCategoryDidChangeNotification = "UIContentSizeCategoryDidChangeNotification"
        func didChangeSizeCategory() {
            NSNotificationCenter.defaultCenter().addObserverForName(UIContentSizeCategoryDidChangeNotification, object: nil, queue: NSOperationQueue.mainQueue(), usingBlock: {_ in
                print("Did receive notification")   
NSNotificationCenter.defaultCenter().postNotificationName(updateTableViewNotification, object: self)
        })

Next I implemented didChangeSizeCategory() method inside applicationDidBecomeActive.

Than I added a method to searchViewController to listen to notification, and this piece of code to the closure:
self.tableView.ReloadData()

Now when I return after enabling bigger text size some cells have resized labels and some don’t. Now I can’t figure out how to refresh whole table view.

When you call reloadData() on the table view, all cells should get reloaded. If only some cells have resized labels, then maybe you reloadData() didn’t happen.

Another explanation is that the text is now too big for the labels and the “autoshrink” setting will resize the text to make it fit again.