Showing posts with label difference. Show all posts
Showing posts with label difference. Show all posts

Monday, 5 August 2013

Difference between #import and #include in Objective C code ? iPhone/ XCode programming

#import and #include are like same. They perform the similar thing but the only difference is that #import makes sure that the same header file hasn't included again.

It is preferred to write #import over #include in your code. 

- Reference Learning from iOS Developer Library

Tuesday, 23 July 2013

How to play sounds in iOS - Xcode ?

There are basically two methods to play sounds, accomplished using two different frameworks :

1. AuidoToolbox framework
2. AVFoundation framework

The difference between AudioToolbox and AVFoundation framework is that AudioToolbox is used for short lengthen sounds whereas the AVFoundation is used for longer sounds.

In AVFoundation, when one sound is being played and the next is turned on then the previous one would be stopped.

Examples for both these will be published in upcoming posts :)