Well I have started to develop [or at least get started].
I have added a new view controller AssemblyImageViewer with a scrollview and
a pagecontrol added to it.
Now on touch event of the 'View Photograph' button on my parent screen [see
picture above] I am trying to open a pop up and show this new view
controller.
But it is throwing a null reference exception: Object reference not set to
an instance of an object.
Here is the code I am using:
I am declaring the UIPopoverController at class level as:
UIPopoverController popctrlr;
Then :
partial void ViewAssemblyPhotoClick (MonoTouch.UIKit.UIButton sender)
{
if(popctrlr==null||popctrlr.ContentViewController==null)
{
popctrlr=new UIPopoverController(new
AssemblyImageViewer());
popctrlr.SetPopoverContentSize(new SizeF(600f,
600f), true);
}
if(popctrlr.PopoverVisible)
{
popctrlr.Dismiss (true);
popctrlr.Dispose ();
return;
}
else
{
popctrlr.PresentFromRect
(btnViewAssemblyPhoto.Frame, this.View,
UIPopoverArrowDirection.Any, true); <----- this line throwing the
exception
}
}
What mistake am I committing?
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/How-to-show-an-imagegallery-in-IPAD-application-tp4656388p4656408.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch