uipopovercontroller

Drop down list ios swift

点点圈 提交于 2019-12-23 00:22:09
问题 I want to have a small UItableView that popup when clicked and shows some numbers in the list. I tried to use popoverPresentationController but it appears full screen for iOS(iPhone) devices. below is the code for same - let filterVC = TableViewController(nibName: "TableViewController", bundle: nil) filterVC.preferredContentSize = CGSize(width: 300, height: 200) filterVC.modalPresentationStyle = UIModalPresentationStyle.popover present(filterVC, animated: true, completion: nil) let

Custom PopOver with pattern border

妖精的绣舞 提交于 2019-12-22 11:09:49
问题 I'm trying to implement popover like that: I've spent quite a lot of time trying to customize UIPopoverController and UIPopoverBackgroundView . As I understand my task is impossible with public API for popovers. It is possible: To use small image with fixed corners and stretchable center, in that case I'll have stretched stripes on the side. And also I'll have image "under" the arrow. Fill border with stripes, but in that case I don't have rounded corners. I also have annoying inner shadow

How to remove the “fuzzy” drop shadow in the UIPopoverController

烈酒焚心 提交于 2019-12-22 07:25:30
问题 I don't want the drop shadow when the UIPopoverController's view appears. Is there a way to remove this drop shadow look? 回答1: Not straight forward, but since iOS 5, you can make your own custom popover background using UIPopoverBackgroundView. See the answer for this question: Using UIPopoverBackgroundView class. It's pointing to a good tuto. Then, in the initWithFrame of your UIPopoverBackgroundView implementation, you can use a clearColor for the drop shadow. Using offset and radius did

UIPopoverController: Why my popover doesn't appears where i want to?

柔情痞子 提交于 2019-12-22 06:48:10
问题 Simple: A view, i present a UIPopoverController in a CGRect using presentPopoverFromRect... and neither the arrow or the popover frame appear even near to the coordinates i asked for in the rect i passed into. Any clues? I've been trying to figure out this by myself but am giving up. Here is the code: if(!myContentController){ myContentController = [[MyContentController alloc] initWithNibName:myNibName bundle:[NSBundle mainBundle]]; // This works pretty well. actually when i show the popover

UIPopoverView becoming distorted when keyboard is shown + iPad

旧时模样 提交于 2019-12-22 06:38:21
问题 I am having an issue with the layout of UIPopoverViewController. Currently I am showing an PopOver of Size (350, 820). I have a button clicking on UIAlertView will be shown with a text field within it.At the same time keyboard is also shown. Now the problem is that whenever the keyboard is my PopOver becomes distorted. Means the up arrow of popover shifts to right and contents of popover mix witheach other. Any help in this regard will greatly appreciated. Thanx 回答1: I was seeing the same

<_UIPopoverBackgroundVisualEffectView> is being asked to animate its opacity

旧街凉风 提交于 2019-12-22 03:58:33
问题 I am trying to show an (AlertController) Action sheet. But I am getting this waning in console " <_UIPopoverBackgroundVisualEffectView 0x7fd65ef76ec0> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1. " here is my code :- extension GroupDataView { func callDot (sender : UIButton) { let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) alert.addAction(UIAlertAction(title: "Edit Group", style: .default

UIPopOverController + UITableView - Hide popover when cell is selected

ε祈祈猫儿з 提交于 2019-12-21 09:15:36
问题 In my Popover controller, i'm having a table view. On selection of a cell, I want to hide the pop over. How can I achieve it. 回答1: In Header file of Root view controller: @property (strong, nonatomic) UIStoryboardPopoverSegue* popSegue; In the implementation file: - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if( [[segue identifier] isEqualToString:@"popover"] ) { NSLog(@"%@",[segue destinationViewController]); self.popSegue = (UIStoryboardPopoverSegue*)segue; [[segue

Using UIActionSheet on iPad

孤人 提交于 2019-12-21 06:58:48
问题 Apple's documentation for the UIActionSheet is causing me confusion. First off, in the iPad Human Interface Guidelines, it says : To learn more about using an action sheet in your code, see “Using Popovers to Display Content” in iPad Programming Guide. But then in the "Using Popovers to Display Content" section, it doesn't mention Action Sheets at all! Am I missing something here? http://developer.apple.com/library/ios/#documentation/General/Conceptual/iPadHIG/UIElements/UIElements.html#/

How to add dimmed background to a custom UIPopoverBackgroundView

一世执手 提交于 2019-12-21 05:00:59
问题 I am making custom popover by subclassing UIPopoverBackgroundView (using this tutorial) and presenting it by using UIPopoverController. Unfortunately as soon as I specify custom popoverBackgroundViewClass the native dimmed background disappears. Is there any way to leave the dimmed background when using custom UIPopoverBackgroundView? Any other solution that I can use to simulate native behaviour? 回答1: Not sure why this got down voted, it's a good question because when you implement a custom

Dismissing a UIPopoverController from within its contentViewController?

风流意气都作罢 提交于 2019-12-21 03:26:05
问题 If you want to dismiss a popover -- for example, from a button within the popover's contentViewController you must -- Create a reference to the popover to be held by view controller which creates it Create a notification from the contentViewController to let the owning view controller know that it should be dismissed, or alternately create a delegate for the same purpose Send the notification or delegate message when the popover is ready to be dismissed Call dismissPopover:animated when the