uipopovercontroller

Show modal view controller with custom frame in iPad

人盡茶涼 提交于 2019-11-30 01:01:56
I want to show a modal UIViewController with a custom frame in iPad, centered on top of its parent view controller. I tried using a form sheet but as far I know the frame and shadow effect can't be changed. vc.modalPresentationStyle = UIModalPresentationFormSheet; [self presentModalViewController:cv animated:YES]; I also tried using a popover but as far as I know either I can't center it or I can't hide the arrow. Is there another way to show modal view controllers? Is it possible to solve this problem by using form sheets or popovers? There is no official way to do this however you can get

How to add a view on top of a UIPopoverController

好久不见. 提交于 2019-11-29 22:27:04
问题 I've got an iPad app with a “drawer” table displayed in a popover. The user can tap-and-hold on an item in the drawer to drag that item out of it and into my main view. That part works fine; unfortunately, the view being dragged appears under the popover, and is too small to be visible until it's dragged out from underneath it. If I add the view as a subview of the view controller in the popover, it gets clipped by the popover's frame, and as I can't access the UIPopoverController 's view, I

Displaying a UIDatePicker inside of a UIPopover

筅森魡賤 提交于 2019-11-29 22:21:09
问题 I'm using the following code to display a UIDatePicker within a UIPopover that is displayed when a user clicks a UIButton . The problem is, it is being displayed in an awkward position and I want to add a UIToolBar above the datePicker where there is extra space. This will have cancel and done button. How can I accomplish this? The button that it is displayed from is the Date of Birth one. - (IBAction)dateOfBirthButtonPressed:(id)sender{ UIViewController* popoverContent = [[UIViewController

UIPopoverController w/ UINavigationController Subview contentSizeForViewInPopover doesnt work on Parent

≯℡__Kan透↙ 提交于 2019-11-29 20:30:51
I have a UIPopoverController with a subclass UINavigationController. Both the parent and child views are UITableviews. When i call parent view originally with contentSizeForViewInPopover = (320,480) it works great. When i click into the child view i resize the popover to contentSizeForViewInPopover = (320,780) When return back to the parent view i cannot get the popover to resize back to contentSizeForViewInPopover = (320,480). the popover stays at the (320,780) size. Been trying everything but just missing something. Anyone know how resize the view with UIPopoverControllers in the above

change the bordercolor of UIPopOverController

拈花ヽ惹草 提交于 2019-11-29 17:21:53
Is it possible to change the default black like color of the UIPopOver to some another color? No its default behavior we cant change it Accepted answer was wrong.. see this http://blog.teamtreehouse.com/customizing-the-design-of-uipopovercontroller 来源: https://stackoverflow.com/questions/3399861/change-the-bordercolor-of-uipopovercontroller

How can I have a popover come from a tab instead of a view

半腔热情 提交于 2019-11-29 16:34:35
I have a tabbar app, and I want a popover to come from one of the tabs. Is there a good/easy way to do this without changing views? There isn't currently a way to directly (through a supported api call) get the frame of a specific tab bar item. What I do is just show the popup from the left end of the tab bar like this: CGFloat tabBarHeight = self.tabBarController.tabBar.bounds.size.height; CGRect rect = CGRectMake(0, 0, tabBarHeight, tabBarHeight); [popoverController presentPopoverFromRect:rect inView:self.tabBarController.tabBar permittedArrowDirections:UIPopoverArrowDirectionDown animated

Dismiss Popover after touch

会有一股神秘感。 提交于 2019-11-29 14:12:17
问题 I've created a popover inside my MainViewController when some button its touched using the UIPopoverPresentationController and set like it's delegate like it's showed in the WWDC 2014, in the following way : MainViewController.swift class MainViewController : UIViewController, UIPopoverPresentationControllerDelegate { @IBAction func showPopover(sender: AnyObject) { var popoverContent = self.storyboard?.instantiateViewControllerWithIdentifier("PopOverViewController") as UIViewController

Remove border for UIPopoverController

我只是一个虾纸丫 提交于 2019-11-29 12:47:48
I have a requirement where in I have to display a custom border for UIPopoverController's popover view instead of the default "Black theme" border. Is it possible? I cannot use the default black border because it doesnt suite the application's color theme. There is no provision in the SDK to do this. I have also googled to see if someone else have faced this problem and if they have solved it, but with no luck! Awaiting suggestions. Thanks, Raj Solved this by using UIView and also by overriding the hitTest in the main rootViewController's view to see if the touch point is outside that view. If

Setting the “title” of a UIPopoverController?

為{幸葍}努か 提交于 2019-11-29 05:49:38
问题 I'm sure there's something obvious I'm missing here, but I know that popover controls can have "titles", a header area that has a line of text above the content view (e.g. the "Tools" popover in iWork). How can I add this in my own popovers? Thanks. 回答1: If you're using a UIPopoverController, just make its contentViewController to be a UINavigationController , and set the title of its deepest view controller. If you're using a UIActionSheet, it has a title property already (which you should

popoverpresentviewcontroller with rectangle corner and without arrow

泄露秘密 提交于 2019-11-29 03:26:04
问题 I want a popover without rounded corners and with no arrow. I have done the following code but it did not work: //SerachPopViewController.swift //MARK: InitCoder required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) //popover settings //popoverPresentationController!.permittedArrowDirections = .Any modalPresentationStyle = .Popover popoverPresentationController!.delegate = self //permittedArrowDirections = UIPopoverArrowDirection(rawValue: 0) self.preferredContentSize = CGSize