开发者

Removing UIPopOver permittedArrowDirections

开发者 https://www.devze.com 2023-03-14 12:35 出处:网络
I have a UIPopOverController and this is my code: [myPopOver presentPopoverFromRect:CGRectMake(20,5, 325, 600) inView:self.view permittedArrowDirections:**UIPopoverArrowDirectionLeft** animated:YES];

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);


You can remove arrow from UIPopover with the help of below code.

[popOverController presentPopoverFromRect:CGRectMake(200, 300, 335, 332) inView:self.view permittedArrowDirections:NO animated:YES];


in swift

let alertController = UIAlertController(title: "title", message: "message", preferredStyle: .ActionSheet)
alertController.popoverPresentationController?.permittedArrowDirections = []


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.


My solution in SWIFT:

popover!.permittedArrowDirections = nil
0

精彩评论

暂无评论...
验证码 换一张
取 消