删除 UIPopOver allowedArrowDirections
我有一个 UIPopOverController,这是我的代码:
[myPopOver presentPopoverFromRect:CGRectMake(20,5, 325, 600) inView:self.view permittedArrowDirections:**UIPopoverArrowDirectionLeft** animated:YES];
但是我不需要方向箭头。任何人都可以告诉我该怎么做。我怎样才能去掉它的箭头?
现在 myPopOver 在一行上显示 4 个照片库图像。任何人都可以告诉我如何在 myPopOver 控制器中的一行上排列或仅显示两个图像。
当我点击任何地方时它也会关闭。我不想关闭它。是否有任何属性可以避免 uipopover 的关闭?
我用了代码
imagePopOver = [[UIPopoverController alloc] initWithContentViewController:self.plc.imagePickerController];
imagePopOver.popoverContentSize = CGSizeMake(150,300);
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);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以借助以下代码从 UIPopover 中删除箭头。
You can remove arrow from UIPopover with the help of below code.
迅速
in swift
UIPopover 不能没有方向箭头。如果您只想要一个显示的视图,那么您需要制作自己的自定义 UIView 并隐藏它,或者将 alpha 设为 0 并在需要时淡入。就视图布局而言,您可以设置要显示的图像视图的框架属性来控制它们的放置位置。
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.
我在 SWIFT 中的解决方案:
My solution in SWIFT: