Events & Reminders on iOS

  Many apps take advantage of the Events or Reminders on iOS. This is very useful when wanting to give the user the ability to add an event to the calendar or a reminder. This is quite simple to do, so let’s take a look.  Create an NSObject Class to manage all our EventKit stuff and add the following: #import <EventKit/EventKit.h> @property (strong, readonly) EKEventStore *eventStore; @property (assign, readonly) BOOL eventAccess; @property (assign, readonly) BOOL reminderAccess; So far we are simply importing the EventKit, which by the way you must add as Link Library in Target Settings, Summary.  Then we add a property to access the EventStore and some booleans.… Read More

Continue Reading

Cocos2d Tips: Sounds & Text

Professionalize your game by adding sounds and text for menus and labels throughout your game. SOUND To play sounds you need the Sound Engine, which you import into your layer like so: #import “SimpleAudioEngine.h” Then you can just code a method to handle some background music playing: -(void)loadAudio { // Loading Sounds Synchronously [CDSoundEngine setMixerSampleRate:CD_SAMPLE_RATE_MID]; [[CDAudioManager sharedManager] setResignBehavior:kAMRBStopPlay autoHandle:YES]; soundEngine = [SimpleAudioEngine sharedEngine]; [soundEngine preloadBackgroundMusic:BACKGROUND_MUSIC]; [soundEngine playBackgroundMusic:BACKGROUND_MUSIC]; } You can see immediately that you can preload the audio in one place and then play it in another. This is great for game performance. This means you can preload audio in the main menu, for example, and then play it when… Read More

Continue Reading