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 »

How to disable caching of a particular image in AFNetworking ios

Hi all Recently i faced a problem while using AFNetworking’s  UIImageView+AFNetworking category.I was making a image editor but the issue was when i used to post the image to my file server after editing the URL send to me of the edited image was same as that of previously unedited… Read more »

How to use varargs….

      No Comments on How to use varargs….

Hi Ever wondered how we give multiple button names in alert view other buttons section…and in many more scenarios.. Ok so how we define a function with varargs.. -(void)getMultipleString:(NSString*)firstString ,… NS_REQUIRES_NIL_TERMINATION; Now the definition -(void)getMultipleString:(NSString*)firstString ,… NS_REQUIRES_NIL_TERMINATION { va_list  t; va_start(t, firstString); id obj; for (obj = firstString; obj !=… Read more »