0
UIボタンを押しながら撮影を実装しましたが、ボタンを押したときにアプリがクラッシュしました。iphoneアプリを使用してカメラから写真を撮る方法
ここにソースコードがあります。
.h file
@interface Camera : UIViewController
<UIImagePickerControllerDelegate>
{
UIImagePickerController *mPicture;
}
@property (nonatomic, retain) UIImagePickerController *mPicture;
.m file
@implementaion Camera
@synthesize mPicture;
-(void)pictureButtonPushed
{
UIImagePickerControllerSourceType mType = UIImagePickerControllerSourceTypeCamera;
if ([UIImagePickerController isSourceTypeAvailable:mType])
{
mPicture.sourceType = mType;
[self presentModalViewController:mPicture animated:YES];
}
}
ここでは、事前
を助けることを願ってみ? – Narayana
の初期化部分は、あなたがここにクラッシュレポートをコピーすることができている
– Garoalいつものように、クラッシュが発生した行と、クラッシュのコンソール出力を指摘できない限り、これは役に立たない。 –