uipopover

UIPopOver From UIButton for iPhone

独自空忆成欢 提交于 2019-12-12 07:03:09
问题 Can we create iPad like UIPopOver in iPhone devices using Swift where source is UIButton . I created UIPopOver from UIBarButtonItem and its working fine but It's not working in case of UIButton . Can anyone suggest a better solution asap. I need to work it in iPhone device. 回答1: Yes you can, but you need to implement delegate of popoverPresentationController let viewController = self.storyboard?.instantiateViewControllerWithIdentifier("AnnotationInfoViewController") as! PopUpViewController /

UITableView inside popover will not scroll

↘锁芯ラ 提交于 2019-12-11 20:15:29
问题 I am trying to fix someone's code and am running into a problem. Here is the situation: I have a full screen UIViewController that has a bottom bar button. When I press that button, it shows a popup view controller in the bottom left of the screen. That view controller inside the popup also has a button, and when I press THAT button it pushes a new view controller into my popup window. That new view controller is a UITableView that can have some large number of elements. The problem is that

How to implement UIPopover kind of functionality in iPhone?

时光毁灭记忆、已成空白 提交于 2019-12-11 04:18:10
问题 In my app i have a PieChart which has certain divisions denoting different areas or region. Every partition has its own color but there are like 10 partitions and i want to show which part shows which region. It would have been an easy task with iPad as we have UIPopover but here in iPhone i don't know what to do, so i thought if there is any suggestion any one can make. I want to PieChart be visible with the detail about each partition. Thanks, 回答1: Here you will find many popover

Garbled exception when implementing UIPopoverBackgroundView subclass

不问归期 提交于 2019-12-10 15:56:56
问题 I've implemented this class as follows: #import "JKBackgroundView.h" @implementation JKBackgroundView static CGFloat jkArrowBase = 26.0; static CGFloat jkArrowHeight = 16.0; // Background image insets static CGFloat jkBackgroundTopInset = 68.0f; static CGFloat jkBackgroundLeftInset = 16.0f; static CGFloat jkBackgroundBottomInset = 16.0f; static CGFloat jkBackgroundRightInset = 34.0f; // Content view insets static CGFloat jkContentTopInset = 40.0f; static CGFloat jkContentLeftInset = 6.0f;

How to display a popover programmatically from a uibutton that is also created programmatically (Not using interface builder)

时间秒杀一切 提交于 2019-12-10 12:31:40
问题 I have a button I have created programmatically within a view controller. Once the button is pressed I want it to to use a method to create the popover programmatically. The button which is created in the ViewDidLoad in my view controller.m UIView *moreFundInfoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 540, 620)]; [self.view addSubview:moreFundInfoView]; [moreFundInfoView setBackgroundColor:[UIColor RMBColor:@"b"]]; btnContact = [UIButton buttonWithType:(UIButtonTypeRoundedRect)];

How to send string value from secondView to mainView with use popover segue?

非 Y 不嫁゛ 提交于 2019-12-08 08:02:06
问题 i want to send string value from secondView to mainView but I click OK button use this code [self dismissViewControllerAnimated:YES completion:nil]; and then prepare segue not working. When I want to click OK button, I send in textfield value to mainView controller. Thanks in replies. 回答1: In your Main View Controller (That contains the label) header file declare the outlet for the label: @property (nonatomic, weak) IBOutlet UILabel *nameLabel; In Your SettingsViewController.m import your

When presenting a popover view, how can I let the user select cell in parent collection view?

两盒软妹~` 提交于 2019-12-06 23:55:21
问题 I have a collection view and when a cell is selected it presents a popover view showing more information about that cell. I would like to allow the user to click another cell and then have the popover view change to showing that cell's information without having to close the popover. If the user were to click somewhere on the parent view that isn't a cell then the popover should close. But, I would like the user to still be able to scroll the collection view without closing the popover. How

Close Popover and open new one with one tap

一曲冷凌霜 提交于 2019-12-06 04:21:40
问题 Apple's "Mobile Human Interface Guidelines" says about Popovers: When possible, allow people to close one popover and open a new one with one tap. This behavior is especially desirable when several different bar buttons each open a popover, because it prevents people from having to make extra taps. The only solution I can think right now is to track the position of the touch when dismissing the popover and check whether that was the position of another button. Is there any easier way to do

how to use popover controller in iPhone

我只是一个虾纸丫 提交于 2019-12-06 02:23:52
问题 I couldn't show popover controller as popover in iPhone whereas it works very well with iPad. Any ideas on how to do that in iPhone. As far as I have searched I couldn't find any. anyways to make the popover appear in iphone as it is in iPad is appreciated ! 回答1: Set yourself as the popover view controller's delegate before presenting it, and implement the delegate method adaptivePresentationStyle(for:traitCollection:) to return .none . This will cause the popover to stop adapting on iPhone

Close Popover and open new one with one tap

孤街浪徒 提交于 2019-12-04 10:16:14
Apple's "Mobile Human Interface Guidelines" says about Popovers: When possible, allow people to close one popover and open a new one with one tap. This behavior is especially desirable when several different bar buttons each open a popover, because it prevents people from having to make extra taps. The only solution I can think right now is to track the position of the touch when dismissing the popover and check whether that was the position of another button. Is there any easier way to do this? PS: I searched in stackoverflow and googled quite a while before posting. Sorry, if this was asked