How to record video in iPhone & with time restriction
Now Create a button in Interface builder & connect that button to your code Use this code in .h file -( IBAction )recordVideo:( id )sender; Use this in the .m file -( IBAction )recordVideo:( id )sender { kpImagePickerController =[[ UIImagePickerController alloc ] init ]; //kpImagePickerController object of UIImagePickerController if ([ UIImagePickerController isSourceTypeAvailable : UIImagePickerControllerSourceTypeCamera ]) { [ kpImagePickerController setSourceType : UIImagePickerControllerSourceTypeCamera ]; [ kpImagePickerController setMediaTypes :[ NSArray arrayWithObject :( NSString *) kUTTypeMovie ]]; kpImagePickerController . videoQuality = UIImagePickerControllerQualityTypeMedium ; kpImagePickerController . videoMaximumDuration = 30 ; // Here we are restrict the time of...