Posts

Showing posts from April 14, 2013

How to upload images with text using iPhone SDK using ASIHttpRequest ?

Code .h file. #import @interface RootViewController : UIViewController {         NSMutableArray *arrImages;     IBOutlet UIButton *btnImage1;     IBOutlet UIButton *btnImage2;     IBOutlet UIButton *btnImage3;     IBOutlet UIButton *btnImage4; } - (IBAction)btnTakePicture_Clicked:(id)sender; - (IBAction)btnPostImages_Clicked:(id)sender; @end Code .m file. #import "RootViewController.h" #import "ASIFormDataRequest.h" @implementation RootViewController int intButton; #pragma mark - #pragma mark View lifecycle - (void)viewDidLoad {     [super viewDidLoad];     self.title = @"Select Images";     arrImages = [[NSMutableArray alloc]init]; } - (IBAction)btnTakePicture_Clicked:(id)sender {     UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Image from..." delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Camera", @"Image Gallary", nil];     a