uipopovercontroller

How To Dynamically change the contentSize of UIPopoverController?

 ̄綄美尐妖づ 提交于 2019-11-30 06:41:58
问题 I have a UIViewController that contains a UITableView . This UIViewController is being displayed in a UIPopoverController . Now, the things is that the number of items in the tableView is not constant, and I want the size of the popover (that is - the popoverContentSize ), to adjust according to the number of items in the tableView Naively, I was thinking that if I'll set the contentSizeForViewInPopover in viewDidLoad after I'm loading the tableView with all the items - It'll do it. It didn't

Compiling against 5.1 SDK forces new UIPopoverController “slide in” presentation of popovers — how to disable?

萝らか妹 提交于 2019-11-30 06:37:59
Compiling my iPad app against the 5.1 SDK (release version) causes UIPopoverController to show itself using the new "slide in" from the left presentation. This completely breaks my popover presentation, which relied on having a "black" style header and a certain height. I've tried setting presentsWithGesture to NO , but that only seems to disable the swipe gesture, and doesn't stop the presentation style. This same app, without being recompiled, but running on iOS 5.1, uses the old popover presentation style. So I know iOS 5.1 still supports the backwards-compatible method. How can I choose to

UIAlertController is Crashed (iPad)

我怕爱的太早我们不能终老 提交于 2019-11-30 06:35:12
问题 I am using Xcode 6 to develop an iOS Application. When I used UIAlertController , it can be worked well on iPhone 6 simulator, but crashes on iPad simulator. My problem while clicking "share", then it could be crashed. How could I solve it? Here is my Code: override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject] { var shareAction = UITableViewRowAction(style: UITableViewRowActionStyle.Default, title: "Share", handler: { (action

Get word from long tap in a word of UITextView

自闭症网瘾萝莉.ら 提交于 2019-11-30 05:27:45
Now I already detect long tap in UITextView - (void)viewDidLoad { [super viewDidLoad]; UILongPressGestureRecognizer *LongPressgesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressFrom:)]; [[self textview] addGestureRecognizer:LongPressgesture]; longPressGestureRecognizer.delegate = self; } - (void) handleLongPressFrom: (UISwipeGestureRecognizer *)recognizer { CGPoint location = [recognizer locationInView:self.view]; NSLog(@"Tap Gesture Coordinates: %.2f %.2f", location.x, location.y); } Now, How should I do to get content of word which got long

popoverpresentviewcontroller with rectangle corner and without arrow

孤街醉人 提交于 2019-11-30 05:20:53
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(width:340,height:380) } //QueryTableViewController.swift @IBAction func searchFilter(sender: AnyObject

Present UIPopoverController in same position with changing just arrow offset

雨燕双飞 提交于 2019-11-30 04:49:32
My goal is to keep same coordinates for a UIPopoverController with just changing arrow offset. So basically i have three buttons touching each of them shows up a popover. When presenting this popover it changes position on the screen, but i do not want that. To be more clear look at screenoshots: For my popover I wanted the arrow to be top-left instead of top-center (which is default). I've managed to get the result below (screenshot) by setting the popoverLayoutMargins property of the UIPopoverController. You can use it to reduce the screen-area used in the internal calculations of the

Popover controller for iPhone [closed]

﹥>﹥吖頭↗ 提交于 2019-11-30 04:02:56
I am working on iPhone application. And I want to create popover controller for my app. It is only available for iPad applications. Please help. You can do it, i have live app with with popover in iPhone. Just You have to create interface for popover NSObject+UIPopover_Iphone.h #import <Foundation/Foundation.h> @interface UIPopoverController (overrides) +(BOOL)_popoversDisabled; @end NSObject+UIPopover_Iphone.m #import "NSObject+UIPopover_Iphone.h" @implementation UIPopoverController (overrides) +(BOOL)_popoversDisabled { return NO; } @end and now just import NSObject+UIPopover_Iphone.h in

IOS7 navigatinBar tintColor change in popover

安稳与你 提交于 2019-11-30 03:19:12
问题 I developed iPad application. I'm opening some screens in popover with navigation controller. But I did not change navigationcontroller tint color in IOS 7. How can I change this color. thanx UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController:airportsSearch] autorelease]; navigationController.navigationBar.barTintColor = [UIColor blackColor]; navigationController.navigationBar.translucent = NO; self.popOver=[[UIPopoverController alloc]

Crash/SIGABRT when I try to present a UIPopoverController

我的梦境 提交于 2019-11-30 02:45:43
问题 Hi I am at my wits end with what I am doing wrong here. I am using ios5 and nothing crashes if I do not call presentPopoverFromBarButtonItem. Has anyone experienced anything similar? I checked the apple developer forums, google, stack overflow and couldn't find anything. Running bt on gdb didn't reveal any hints either. UIViewController *viewTwo; viewTwo = [[ViewTwo alloc] initWithNibName:@"ViewTwo" bundle:nil]; UIPopoverController *popover; popover = [[UIPopoverController alloc]

Dynamic UITableView height in UIPopoverController (contentSizeForViewInPopover)?

假如想象 提交于 2019-11-30 02:24:51
I have an ipad popover that contains an UITableView . After the table is populated, it usually has a few items in it only (4-5), so I'm looking for a way to resize the popover ( contentSizeForViewInPopover ) to the actual table height (the summed height of all its cells). So, I do have the height but I'm not sure where to call contentSizeForViewInPopover , I did try to call it in: viewDidAppear and viewWillAppear but with no success since it seems that the table gets populated later and the actual height is only available later. Any thoughts on this? Thanks! EDIT: My cells have different