Gate2Play and iOS integration.

HI, If you are making an application which targets middle east then you will come across a payement gateway  provider gate2play .The apis mentioned are al for web portal and FAQ states that it can be used on mobile platform  but Ok so i spend my whole day and finally integrated it and now i … Read more

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 name:@”upload_file” fileName:@”<your_filename>” mimeType:@”text/plain”] // you … Read more

Using recursion without its hassels

Hi We all know how recursion can simplify code.It gives further more control when used through blocksBut the disadvantage of recursion is the memory keeps piling up till the very end. recently i implemented recursion using blocks in an iOS project but i placed the call to the function in performselectorinbackground    the result was … Read more

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 != nil; obj = va_arg(t, id)) … Read more