Objective-C Tutorials

Starting this month, I will be posting many Objective-C tutorials on this blog. I will include code snippets and videos demonstrating the compilation and running of the code via Xcode. For those that have been following my blog since codeitbybenny.com, all new tutorials will be posted here instead of the old site, which will be taken down in the next coming weeks. I am extremely excited to write Objective-C tutorials, as I am constantly learning more about the language myself. I will be mostly following concepts from the fantastic book: iOS Programming: The Big Nerd Ranch Guide (4th Edition) (Big Nerd Ranch Guides)

Feel free to purchase the book and follow along, as I am assuming you know the basic concepts of Objective-C. I feel that reiterating the things I learned will solidify my own understanding of the concepts in iOS programming, as well as show you all how it works. I will be posting about a blog everyday covering various chapters within the book. This will be very exciting and rewarding for both me and you all!


We will create a program that searches for elements within a list. Let’s say we have a list of bank accounts, called BANKACCOUNTS.txt, with the customer’s account number, last name, first name, pin, and balance:


Sorting and Private Elements

Knowing how to sort is a key tool in C++. Today I will demonstrate how this can be accomplished. Note that I will not be using the sort function within the and instead I will just use simple for loops and other fun stuff. This way, it is much easier to understand what is going on.


I/O Files and Strings

Knowing how to work with input and output files is very important when working with C++. To access the classes for using input/output, include the following headers in your code:

#include //stream class for both read and write to/from files