如何在ios中设置警报视图 [英] how to set the alert view in ios
本文介绍了如何在ios中设置警报视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
需要在 picker.sourceType = UIImagePickerControllerSourceTypeCamera
的下一步设置警报视图。
应该设置if条件,相机是否没有发生ios模拟器。
Need to set the alert view at next of picker.sourceType = UIImagePickerControllerSourceTypeCamera
.
should set the if condition , whether the camera is not occurring ios simulator.
-(IBAction) getPhotoAction:(id) sender {
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
if((UIButton *) sender == camera) {
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
} else {
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
}
[self presentModalViewController:picker animated:YES];
}
推荐答案
一对帮助你的链接 -
http://code.tutsplus.com/tutorials/ios-sdk-working-with -uialertview-and-uialertviewdelegate - mobile-3159 [ ^ ]
https://developer.apple.com/library/ios/documentation/uikit/reference/UIAlertView_Class/UIAlertView/UIAlertView.html [ ^ ]
Couple of links to help you -
http://code.tutsplus.com/tutorials/ios-sdk-working-with-uialertview-and-uialertviewdelegate--mobile-3159[^]
https://developer.apple.com/library/ios/documentation/uikit/reference/UIAlertView_Class/UIAlertView/UIAlertView.html[^]
这篇关于如何在ios中设置警报视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文