Tuesday, 28 June 2016

How to get Image Filters in Core Image framework

ios_7_logo__concept__by_osullivanluke-d63usbi.png

Many times we need to check what Core Image filters do we have in iOS framework. Here is a simple code to get all the list of filters with their attributes.

This will be easier for you to check and apply any filter on an image.

I have passed nil to get all the categories. You can pass other categories displayed in CIFilter.h class

Example 1: Passing as nil

Example 2: Passing a category

Read more about How to get Image Filters in Core Image framework visit Findnerd.

Tuesday, 14 June 2016

Collapsable UITableView header in Swift

maxresdefault.jpg

To collapse table header in swift

1. Make a property of NSMutableSet, name it "collapsedSections", this property will be use to check Collapsed section in the UItableViewCell.

2. Create a header for UITableView and give UIButton tag to the header .

3. To Collapse section of UITableView the following method will be trigger .

Read more about Collapsable UITableView header in Swift visit Findnerd.

Wednesday, 11 May 2016

Autocomplete API with Google Maps SDK on iOS


Gmap.png

By Using the following code you can integrate the Google Maps SDK in your iOS project.
First we will write the function which results the array of related nearby places.
  1. -(void) searchLocation:(NSString *)locationName{
  2.   GMSAutocompleteFilter *filter;
  3.   filter.type=kGMSPlacesAutocompleteTypeFilterGeocode;
  4.   GMSVisibleRegion visibleRegion = _mapView.projection.visibleRegion;
  5.   GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithRegion: visibleRegion];
  6.   [[GMSPlacesClient new] autocompleteQuery:locationName bounds:bounds filter:filter callback:^(NSArray *results,NSError *error){
  7.       if (error != nil) {
  8.           [locationAray removeAllObjects];
  9.           [self.locationTableView reloadData];
  10.           return;
  11.       }
  12.      
  13.       if ([results count]>0) {
  14.           [locationAray removeAllObjects];
  15.           [locationAray addObjectsFromArray:results];
  16.           [self.locationTableView reloadData];
  17.       }
Read the full blog about Autocomplete API with Google Maps SDK on iOS visit Findnerd.