Search code examples
objective-cxcodeipaduipopovercontroller

Removing UIPopOver permittedArrowDirections


I have a UIPopOverController and this is my code:

[myPopOver presentPopoverFromRect:CGRectMake(20,5, 325, 600) inView:self.view permittedArrowDirections:**UIPopoverArrowDirectionLeft** animated:YES];

However I need no direction arrows.can any one tell me how can I do it. How can I remove the arrow from it?

Now myPopOver displaying 4 photolibrary images on a Row.can any one tell me how can arrange or display only two images on a row in myPopOver controller.

And also it dismissing when I click on ay place.I don't want to dismiss it.is the any property to avoid the dismiss of uipopover?

I used the code

imagePopOver = [[UIPopoverController alloc] initWithContentViewController:self.plc.imagePickerController];
imagePopOver.popoverContentSize = CGSizeMake(150,300);

Solution

  • You cannot have no direction arrows with a UIPopover. If you just want a view that appears than you will need to make your own custom UIView and hide it or turn the alpha to 0 and fade it in when you need it. As far as view layout goes you can set the frame property of your image views that you are showing to control where they are placed.