I found this article on how to read a file line by line, and it uses a function to read each line: Objective-C: Reading a file line by line
I’d like to increase my code reuse and put more code into smaller reusable pieces. Should I use Objective-C methods or functions? I’m talking about code that would be executed hundreds of times a minute.
Thank you!
Use classes and methods. Code reuse is one of the main goals of object oriented programming. Code reuse is also one of the main reasons for which Objective-C was invented, to add classes and methods to C, which only supported functions and thus no OOP.