Well I have made some modifications.

I am trying to open a popup on clicking the 'Take Photograph' button. In
that popup I am supposed to load the images that have been saved from
internet. Here is the code I am using to open popup.

partial void TakeSpacePhoto (MonoTouch.UIKit.UIButton sender)
                {
                        var camera=UIImagePickerControllerSourceType.Camera;
                        if(UIImagePickerController.IsSourceTypeAvailable 
(camera))
                        {
                                UIImagePickerController picker=new 
UIImagePickerController();
                                picker.SourceType=camera;
                                picker.Delegate=new 
StillImagePickerDelegate(new PhotoPicker());
                                this.PresentModalViewController (picker, true);

                        }
                        else
                        {
                                popover=new UIPopoverController(new 
PhotoPicker());
                                popover.PopoverContentSize=new SizeF(400f, 
600f);
                                popover.PresentFromRect(btnTakePhoto.Frame, 
this.View,
UIPopoverArrowDirection.Any, true);
                        }
                }

Here PhotoPicker is an empty Ipad View Controller with no elements int.
And in the ViewDidLoad event of this form I am using the following code:

public override void ViewDidLoad ()
                {
                        base.ViewDidLoad ();
                        if (
UIImagePickerController.IsSourceTypeAvailable(UIImagePickerControllerSourceType.SavedPhotosAlbum)
)
                        {
                                UIImagePickerController picker=new 
UIImagePickerController();
                                picker = new UIImagePickerController();
                                picker.Delegate = new 
ImageGalleryPickerDelegate(this);
                                picker.SourceType = 
UIImagePickerControllerSourceType.SavedPhotosAlbum;
                                this.PresentModalViewController(picker, true);

                        }
                                // Perform any additional setup after loading 
the view, typically from a
nib.
                }


Here ImageGalleryPickerDelegate is the same class that I posted in my
previous post. The situation is that when the popup opens it is completely
empty. There are no images in it. Why aren't the images bring loaded? I've
tried both SavedPhotoAlbums and PhotoGallery as source types, but no
success. 

Please help me somebody. I am hopelessly stuck!!

Many Thanks.



--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Take-Pictures-with-IPHone-Camera-tp4656124p4656217.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to