O'Reilly logo

iPhone Location Aware Apps by Example by Zeeshan Chawdhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — filtering Events by categories

We use the last example and extend it to first show the list of categories, and based on user selection, we call the right Eventful API URL. The project is titled Hello Events-Filtering.

  1. Open Hello_EventsFirstViewController.h and declare some more functions as well as modifying the readEventFulApi method so that it starts accepting the Category ID as a parameter.
    -(NSString *) getDatabaseFullPath;
    -(NSString *) initializeDatabase;
    -(void) readEventFulApi:categoryId;
    
    -(void) readEventsFromLocal;
    -(NSString *) returnCategoryIdForName:categoryName;
    
    -(void)readCategoriesFromApi;
    -(void)readCategoriesFromLocal;
    
    
  2. The methods in bold are new additions. The returnCategoryIdForName:categoryName ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required