uipopovercontroller

Drag-n-Drop from UIPopoverController to other UIView

老子叫甜甜 提交于 2019-11-27 11:23:29
问题 How would I go about implementing dragging and dropping a UIView from UIPopoverController into the back UIView . This is the functionality that Pages provide in their insert media popover, where you can drag a shape out from the UIPopoverController and drop it into the main document. I am actually confused with the pan UIGestureRecognizers and where they will be implemented. Thanks, Umer 回答1: You have to deal with two view controllers one that's in the background called mainController one

UIPopoverController does not dismiss when clicking on the NavigationBar

怎甘沉沦 提交于 2019-11-27 07:35:45
问题 When clicking on a rightBarButton, a UIPopoverController will present. The problem is: when clicking on the NavigationBar, this UIPopoverController does not dismiss. Why? And is there a way to resolve it? I have tried to search, but can't find anything about this. Thanks in advance. 回答1: UIPopoverController seems to add the navigation bar to its passthroughViews array when it is presented. I was able to solve the problem by re-setting passthroughViews to an empty array immediately after

UIPopOverController for iPhone (currently only available for iPad)

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:50:34
Before I implement something similar for the iPhone, I'm wondering if anyone has implemented something similar of the UIPopOverController for the iPhone . This is so far only available for iPad. See my implementation here: https://github.com/werner77/WEPopover It has the same interface as the UIPopoverController but is generalized for iPhone and with support for custom background views. I have provided another alternative SGPopoverController at http://github.com/KJoyner/SeaGlass . Like the WEPopover, this has a similar interface to UIPovoerController but works on the iPhone. This version

How to Dismiss a Storyboard Popover

走远了吗. 提交于 2019-11-27 06:15:49
I've created a popover from a UIBarButtonItem using Xcode Storyboards (so there's no code) like this: Presenting the popover works just fine. However, I can't get the popover to disappear when I tap the UIBarButtonItem that made it appear. When the button is pressed (first time) the popover appears. When the button is pressed again (second time) the same popover appears on top of it, so now I have two popovers (or more if I continuer pressing the button). According to the iOS Human Interface Guidelines I need to make the popover appear on the first tap and disappear on the second: Ensure that

UISplitViewController in a TabBar ( UITabBarController )?

吃可爱长大的小学妹 提交于 2019-11-27 06:12:52
I am in kind of situation that I need to start with a tab based application and in that I need a split view for one or more tabs. But it seems that split view controller object can not be added to the tabbarController. (Although tabbar object can be added to the splitviewcontroller). The problem can be seen otherways: I have a full screen in the left part I have a table view when any row is selected in the table a popover should come out pointing that row. Now when any row in the popover is selected the rows in this popover comes to the left under the selected row (only this row would be

iPad iOS7 - UIImagePickerController in UIPopoverController has wrong preview image

南笙酒味 提交于 2019-11-27 05:39:25
问题 I am using an UIImagePickerController within an UIPopoverController which is working perfectly with iOS6. With iOS 7 the "preview" image which is shown to capture the image is rotated, but if I take a picture it is saved correctly. This is how I get my picker: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.mediaTypes = [NSArray arrayWithObjects: (NSString

How can I get the selected text frame from a UITextView

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 05:20:26
问题 I'm trying to display an UIPopoverController from the rect of a selected text in an UITextView , How can I get the selected text CGRect ? Thanks! 回答1: I think [UITextInput selectedTextRange] and [UITextInput caretRectForPosition:] is what you are looking for. [UITextInput selectedTextRange] returns the selected range in character [UITextInput caretRectForPosition:] returns the CGRect of the character range in this input. UITextView conforms to UITextInput (since iOS 5), so you can use these

Code is exectuting but the view is not loading when called form a function?

不想你离开。 提交于 2019-11-27 04:48:45
问题 I am doing a book kinda application using a viewBased application. The mainView acts as the backgroundView for loading pages. Each page is a different view and have its own nib. When i swipe on a page(actually on the mainView which have loaded the current view/page), that page will be removed and the next/previous page will be added. [currentPage.view removeFromSuperview]; [self.view insertSubview:nextPage.view atIndex:0]; I have added a popoverController with a barbutton in this mainView.

Popovers cannot be presented from a view which does not have a window

时光总嘲笑我的痴心妄想 提交于 2019-11-27 04:34:52
What does this error indicate: "Popovers cannot be presented from a view which does not have a window." the view you're adding the popover to has to already have been added to a window with the "addSubview:" method. Try waiting until - (void) didMoveToWindow is called for the view and then load the popover the thing that saved my life: if (self.view.window != nil) [popoverController presentPopoverFromRect:CGRectMake(44, yCoord, 111, 111) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; by adding if condition it doesn´t crash anymore. I don´t really get it

iOS - Create an Popover View using StoryBoard

╄→尐↘猪︶ㄣ 提交于 2019-11-27 03:40:54
问题 Hi there, Now I'm trying to create a Pop-OverView using an Xcode storyboard. Firstly, I have rootViewController, UIViewController, and UITableViewController I want the UIView to act as a page flip and the UITableView will show popOver under the navigationBar item controller. For the UITableView, I want to make a Pop-Over under NavigationBar controller. The problem is, when I touch the Navigation item to show the UITableViewController, it shows correctly, but when I try to close the Pop-Over