iOS 8 CLLocationManager asking for user permission

Pre iOS 8 it was enough to allocate location manager object to generate a permission request locationManager=[[CLLocationManager alloc] init]; but post iOS8 things have changed, in order to initiate the the request for location information you have to do following steps Add keys in info plist NSLocationWhenInUseUsageDescription   : against… Read more »

Block for excuting task after fixed interval give NSTimer a miss

Hi, If ever you feel the need to repeat a task after say 5 seconds and you feel nastimer is too clumsy to use then you can use…   void runBlockEveryMinute(int *breakCondition, dispatch_block_t block) { if(*breakCondition==0) { return; } block(); // initial block call // get the current time struct… Read more »

Image view category to download image from web and cache them.

Hi There I came across the idea image view category which could provide for caching the downloaded image and also provide for ignoring the cache if required. Inspired by impressive AFNetworking category of UIImage view i went on to write my own ASImageView modified version. Now i put it to… Read more »

File Upload using AFNetworking in iOS application.

      No Comments on File Upload using AFNetworking in iOS application.

Hi If developing a app at times you are required to upload files. As i got stuck many times so i thought about writing most common way of uploading. UpDate for AFNetworking 3.0 AFNetworking 3.0 is NSURLSession based. NSMutableURLRequest *upload_request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@”POST” URLString:@”<path_URL>” parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) { [formData appendPartWithFileData:data… Read more »

How to change your tool bar button (run,build for testing, build for profiling,analysing) in xcode

Hi Most of us are familiar with the run button at the top left toolbar section of XCode.But i some how changed it to test button accidentally. Its not an issue but the small arrow at the bottom, on which you will click intuitively will disappoint you. The trick is… Read more »