mauricesharp / learning-ios-development Goto Github PK
View Code? Open in Web Editor NEWSample code for "Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming" published by Addison-Wesley
Sample code for "Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming" published by Addison-Wesley
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
Is this necessary in both? If so, can you please explain why?
Thanks!
Rose
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.