uipopover

Its possible to change font of UILabel from other ViewController class

会有一股神秘感。 提交于 2019-12-25 06:21:40
问题 I have a ViewController which consist of UILabel and UIButton . OnClick UIButton a popOver present which show tableView . each cell of tableView represent different font option. I want to change the font of UILabel based on user selected font from tableViewCell . how i can achieve this as my UILabel and tableView are in different viewController class. Please help me. func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { var row = indexPath.row // How to

Dismissing and Opening a UIPopOver with one UIToolBarItem Button?

混江龙づ霸主 提交于 2019-12-25 00:31:59
问题 I was wondering how I could use 1 button on my ToolBar to open and dismiss my UIPopOver. If I keep tapping the button right now, another PopOver overlaps the previous one. I want ONE button to be able to dismiss and open my PopOver. I tap once, it opens. I tap the button again, it dismisses. Please tell me how. Thanks 回答1: In your button tap action event: if (myPopover.popoverVisible) //self.myPopover if using property { [myPopover dismissPopoverAnimated:YES]; return; } //continue code here

uidatepicker in uipopover delegate

无人久伴 提交于 2019-12-24 10:46:14
问题 I am trying to insert a uipopover with uidatepicker in it with two buttons - Cancel and Done. I was able to design the layout using storyboard with the help of UIDatePicker in UIPopover and How can I show a UIDatePicker inside a Popover on iPad using StoryBoard? But, I am not able to get the date from uidatepicker to uiviewcontroller when Done button is pressed. I am new to ios programming and i find delegate methods very confusing. Could somebody shed some light? Help much appreciated. Thank

How can I make UIPopoverPresentationController resize on navigation pop?

爷,独闯天下 提交于 2019-12-23 07:38:10
问题 I'm using UIPopoverPresentationController for popovers in an iOS app. When a navigation controller in a popover pushes a new view controller, the popover resizes to that view controller's preferredContentSize . But when the navigation controller pops a view controller off the stack, the popover does not resize to the previous size. How can I make it do that? Possible duplicate of this question, but for the modern UIPopoverPresentationController . Update: See here for example code illustrating

Present a UIAlertController from within a Popover in iOS8

做~自己de王妃 提交于 2019-12-21 01:59:22
问题 I set a UITableViewController to be displayed in a popover on iPad : When I click on a row, I display an alert to warn the user of a potential destructive action. I used the new UIAlertController, and here is what happens: The popover becomes very small (the size of the alertController view in fact). If I press Cancel, I can see the result : Here is my code: override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { var previouslySelectedCell:

How to make UIPopoverController keep same position after rotating?

三世轮回 提交于 2019-12-20 08:32:14
问题 I can't keep popover the same position on the screen after rotation. Is there any good way to do that, because just setting some frame to popover works terrible after rotating. popover.frame = CGRectMake(someFrame); After rotation popover looks fine only if it is in the center of the screen. 回答1: Apple has a Q&A on exactly this issue. You can find the details here: Technical Q&A QA1694 Handling Popover Controllers During Orientation Changes Basically, the technique explains that in your view

UIPopoverPresentationController on iOS 8 iPhone

三世轮回 提交于 2019-12-17 02:12:17
问题 Does anyone know if UIPopoverPresentationController can be used to present popovers on iPhones? Wondering if Apple added this feature on iOS 8 in their attempt to create a more unified presentation controllers for iPad and iPhone. Not sure if its OK to ask/answer questions from Beta. I will remove it in that case. 回答1: You can override the default adaptive behaviour ( UIModalPresentationFullScreen in compact horizontal environment, i.e. iPhone) using the

UIPopoverPresentationController on iOS 8 iPhone

拜拜、爱过 提交于 2019-12-17 02:11:06
问题 Does anyone know if UIPopoverPresentationController can be used to present popovers on iPhones? Wondering if Apple added this feature on iOS 8 in their attempt to create a more unified presentation controllers for iPad and iPhone. Not sure if its OK to ask/answer questions from Beta. I will remove it in that case. 回答1: You can override the default adaptive behaviour ( UIModalPresentationFullScreen in compact horizontal environment, i.e. iPhone) using the

popoverControllerDidDismissPopover NOT doing what I think it should

大憨熊 提交于 2019-12-13 01:35:10
问题 So, I think that when I click outside of a popover, the method popoverControllerDidDismissPopover should be called. I know this isn't called when dismissPopoverAnimated is called. I have a simple project that I have setup that shows popoverControllerDidDismissPopover just isn't called: #import "ViewController.h" #import "PopoverViewController.h" @interface ViewController () { PopoverViewController *controller; UIPopoverController *popoverController; } @end @implementation ViewController

PopoverPresentationController coming as nil

℡╲_俬逩灬. 提交于 2019-12-12 21:25:44
问题 Created a SingleViewApplication in that I have placed a button. Now clicking on button I need to display a tableView as popover. The TableViewController is created in xib. The issue is tableViewController.popoverPresentationController always comes as nil see below code let filterVC = TableViewController(nibName: "TableViewController", bundle: nil) var filterDistanceViewController = UINavigationController(rootViewController: filterVC) filterDistanceViewController.preferredContentSize = CGSize