私はライブラリーで写真を選んでサーバーに送ることができるアプリを書いています。 これは私のコードiOS:写真を選んだ後にビューを切り替える方法は?
-(IBAction)btnTakePictureClicked { UIImagePickerController* picker = [[UIImagePickerController alloc] init]; picker.delegate=self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:picker animated:YES]; [picker release]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{ [picker.parentViewController dismissModalViewControllerAnimated:YES]; self.imgTemp = image; // Where should these lines be? Send* send = [[Send alloc] initWithNibName:@"Send Email" bundle:nil]; [self presentModalViewController:send animated:YES]; [send release]; } - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { [picker.parentViewController dismissModalViewControllerAnimated:YES]; }
私は写真を選ん後、それがページを送信するために変更されることが期待されます。しかし、それはまだホームページに戻ります。
これらの行はどこですか?あなたがイメージを選択すると
Send* send = [[Send alloc] initWithNibName:@"Send Email" bundle:nil]; [self presentModalViewController:send animated:YES]; [send release];
それはまだ戻っページにライブラリからロードするボタンが含まれていて。とにかく、助けてくれてありがとう。 –