Code Monkey home page Code Monkey logo

learning-ios-development's People

Contributors

mauricesharp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learning-ios-development's Issues

Chapter 3

I am going through this book (love it by the way, it is a perfect level for my experience and skillset). I have a question on #imports: in

  • ViewController.h: #import "CarEditViewController.h"
  • ViewController.m: #import "CarEditViewController.h"

Is this necessary in both? If so, can you please explain why?
Thanks!
Rose

Chapter 10: Exception when changing Make

Hello Maurice,

I found a bug in sample code for the chapter 10.

It happens rarely but anyway it happens.

To reproduce it you need to have at least 2 section for the car make (it could be also model or year) and in one of these sections you should have at least 2 records.
The sort order should be “Make”. Then you need to change the last record of these 2 and change the name of Make - it will lead to exception and crash when you return back to Table View.

Th reason is the TableView is updated 2 times.

First during the call "controller:(NSFetchedResultsController *)controller didChangeObject: ….” with type NSFetchedResultsChangeMove - because the record is moved from one section to another one.
And the second call from “carViewDone:” where "[self.tableView reloadRowsAtIndexPaths …." leads to exception because this row was already removed by "controller:(NSFetchedResultsController *)controller didChangeObject: ….”

My suggestion to remove call of “carViewDone:” at all and just implement the case for NSFetchedResultsChangeUpdate

   case NSFetchedResultsChangeUpdate:
       [self.tableView reloadRowsAtIndexPaths:@[newIndexPath] withRowAnimation:UITableViewRowAnimationLeft];
       break;

Sorry for my English, but hope this helps to improve your book.
Thanks a lot for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.