Skip to Content
iOS 7 Programming Fundamentals
book

iOS 7 Programming Fundamentals

by Matt Neuburg
October 2013
Beginner content levelBeginner
422 pages
12h 35m
English
O'Reilly Media, Inc.
Content preview from iOS 7 Programming Fundamentals

Chapter 1. Just Enough C

Do you believe in C? Do you believe in anything that has to do with me?

Leonard Bernstein and Stephen Schwartz, Mass

To program for iOS, you need to speak to iOS. Everything you say to iOS will be in accordance with the iOS API. (An API, for application programming interface, is a list or specification of things you are allowed to say when communicating.) Therefore, you will need some knowledge of the C programming language, for two reasons:

  • Most of the iOS API involves the Objective-C language, and most of your iOS programming will be in the Objective-C language. Objective-C is a superset of C. This means that Objective-C presupposes C; everything that is true of C trickles up to Objective-C. A common mistake is to forget that “Objective-C is C” and to neglect a basic understanding of C.
  • Some of the iOS API involves C rather than Objective-C. Even in Objective-C code, you often need to use C data structures and C function calls. For example, a rectangle is represented as a CGRect, which is a C struct, and to create a CGRect from four numbers you call CGRectMake, which is a C function. The iOS API documentation will very often show you C expressions and expect you to understand them.

The best way to learn C is to read The C Programming Language (PTR Prentice Hall, 1988) by Brian W. Kernighan and Dennis M. Ritchie, commonly called K&R (Ritchie was the creator of C). It is one of the best computer books ever written: brief, dense, and stunningly precise and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

iOS 7 Programming Cookbook

iOS 7 Programming Cookbook

Vandad Nahavandipoor
Programming iOS 11

Programming iOS 11

Matt Neuburg
Programming iOS 12

Programming iOS 12

Matt Neuburg

Publisher Resources

ISBN: 9781491946039Errata PageSupplemental Content