How To Open VideoPicker iPhone Example Code

// “iPhone1,2” equals to iPhone 3G
size_t size;
sysctlbyname(“hw.machine”, NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname(“hw.machine”, machine, &size, NULL, 0);
NSString *platform = [NSString stringWithUTF8String:machine];

if([platform isEqualToString:@”iPhone1,2″]){
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”” message:@”Device does not support camera video mode” delegate:nil cancelButtonTitle:@”Ok” otherButtonTitles:nil, nil];
[alert show];
[alert release];
tabView.hidden = YES;
libreayFlag = NO;
backView.frame = CGRectMake(0, 0, 320, 460);
Image_picker = [[UIImagePickerController alloc] init];
Image_picker.navigationBar.tintColor = [UIColor brownColor];
Image_picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
Image_picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];

Image_picker.delegate = self;
[self presentModalViewController:Image_picker animated:YES];
[Image_picker release];
// videoViewController *video_Obj = [[videoViewController alloc]init];
// video_Obj.tabView = tabView;
// video_Obj.backView = backView;
// [self.navigationController pushViewController:video_Obj animated:YES];
// [video_Obj release];



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s