画像処理アプリのios6対応 ― 2012/10/03 20:14
数年前に
マイナビの記事
を参考に作った
画像処理アプリ
が、ios6になってクラッシュするようになったとのユーザーレビューがあったので、修正。
- (void)actionSheet:(UIActionSheet*)actionSheet
clickedButtonAtIndex:(NSInteger)buttonIndex
{
. . . . . . . . . . . .
. . . . . . . . . . . .
//イメージピッカーを表示する
//[self presentModalViewController:imagePicker animated:YES];
// 修正→
[self presentViewController:imagePicker animated:YES
completion:^{
NSLog(@"complete");
}];
}
// 選択完了
//- (void)imagePickerController:(UIImagePickerController*)picker
// didFinishPickingImage:(UIImage*)image
// editingInfo:(NSDictionary*)editingInfo
// 修正→
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)editingInfo {
//イメージピッカーを隠す
//[self dismissModalViewControllerAnimated:YES];
// 修正→
[self dismissViewControllerAnimated:YES completion:^ {
NSLog(@"complete");
}];
// 画像処理など
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
}
// キャンセル
- (void)imagePickerControllerDidCancel:(UIImagePickerController*)picker
{
//イメージピッカーを隠す
//[self dismissModalViewControllerAnimated:YES];
// 修正→
[picker dismissViewControllerAnimated:YES completion:^{
NSLog(@"complete");
}];
}
最近のコメント