uipopovercontroller

Navigation Controller in popover

不羁岁月 提交于 2019-12-30 09:47:08
问题 I am a total newbie in the ipad app development. I am interested in creating an application where i have a popover showing a tableview with list of items. Then i select an item and the view drills to another tableview consisting of another list of items and a navigate back button as well. the level to which i would be drilling down is dynamic. Please guide me with appropriate resources to help me solve the problem. 回答1: I did it before and it works well! Just assign this function to your

Get word from long tap in a word of UITextView

拈花ヽ惹草 提交于 2019-12-30 01:29:46
问题 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

iOS 8 presentationController determine if really is popover

梦想与她 提交于 2019-12-29 05:13:11
问题 I'm using the new adaptive "Present As Popover" capability of iOS 8. I wired up a simple segue in the StoryBoard to do the presentation. It works great on an iPhone 6 Plus as it presents the view as a popover and on an iPhone 4s it shows as a full screen view (sheet style). The problem is when shown as a full screen view, I need to add a "Done" button to the view so dismissViewControllerAnimated can be called. And I don't want to show the "done" button when it's shown as a popover. I tried

ios 9 UIPopoverPresentationController constant placement on rotation

北慕城南 提交于 2019-12-25 08:21:07
问题 in iOS9 when I rotate my screen with a UIPopoverPresentationController the coordinates are reset to 0 and not attached to my sourceView which is a button. I have tried: func popoverPresentationController(popoverPresentationController: UIPopoverPresentationController, willRepositionPopoverToRect rect: UnsafeMutablePointer, inView view: AutoreleasingUnsafeMutablePointer) { rect.initialize(CGRectMake(200, 200, 400, 400)) } but no avail. Any help ? 回答1: You could apply constraints to you

How to show NSTimer's time value in UITableViewCell's label

瘦欲@ 提交于 2019-12-25 07:14:35
问题 ...continuing question How to set Action for UIButton in UITableViewCell I have NSTimer working in singleton. There is only 1 timer, but it contains a Dictionary with several items which contains time values. Every minute timer decrements 1 from time value of all items in dictionary. The dictionary's structure is: Key: "1", Value: Array with objects NSString, NSInteger (time value) TimerCell is a tableViewControllers's cell. UITableViewController appears in UIPopoverController. So I would

multiple views navigation in UIPopovercontroller

≯℡__Kan透↙ 提交于 2019-12-25 05:08:11
问题 i have a button in the main view ..when the her tap that button it shoes the popoverview ,inside the popover i have a uiviewcontrolle,when the user tap the tableviewcell inside the popover it navigate to next page,,then the user tap any button of the next page ,,,it navigate to another view,all are inside popover..everything works fine..but here in my last view...i need to go to main page,,but i can see the main page inside the popover,i want to dismiss that popover and go tot main page,i

FPPopover won't pop up on button press, just NSLogs “FPPopoverController dealloc”

故事扮演 提交于 2019-12-24 20:17:53
问题 I have the following code: - (IBAction)textOptionsTapped:(UIBarButtonItem *)sender { UIView *buttonView = [sender valueForKey:@"view"]; FPPopoverController *popover = [[FPPopoverController alloc] init]; popover.arrowDirection = FPPopoverArrowDirectionDown; [popover presentPopoverFromView:buttonView]; } What exactly is causing my app to NSLog "FPPopoverController dealloc" every time I press the button? 回答1: Here's my implementation that's working in production. Try this out. It may just be

Send a Delegate message from UIPopover to Main UIViewController

廉价感情. 提交于 2019-12-24 11:15:09
问题 I'm trying to use a Button in my UIPopover to create a UITextView in my Main UIViewController the code I have looks something like this ( PopoverView.h file): @protocol PopoverDelegate <NSObject> - (void)buttonAPressed; @end @interface PopoverView : UIViewController <UITextViewDelegate> { //<UITextViewDelegate> id <PopoverDelegate> delegate; BOOL sendDelegateMessages; } @property (nonatomic, retain) id delegate; @property (nonatomic) BOOL sendDelegateMessages; @end Then in my PopoverView.m

Black Bar in UIImagePicker on iPad - Only in Landscape Right Orientation

喜欢而已 提交于 2019-12-24 10:39:31
问题 I am showing a UIImagePicker (itself in a UIView) via a UIPopOver. This works fine, however when the iPad is rotated onto its right side I get a strange black bar along the left hand side of the popover as per the image below. The cancel button is also partially off the right hand of the screen. This doesn't happen in any other orientation which is odd. The code is also listed below. Can anyone suggest why I am getting this black bar ? imagePickerController = [[UIImagePickerController alloc]

How to dismiss the UIPopoverController?

南笙酒味 提交于 2019-12-24 04:23:19
问题 I have created a UIPopoverController and added it to a view controller when clicking an UIButton as follows - (void)viewDidLoad { [super viewDidLoad]; controller = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:[NSBundle mainBundle]]; popoverController = [[UIPopoverController alloc] initWithContentViewController:controller]; } - (IBAction)showPopover:(UIButton *)sender { if ([popoverController isPopoverVisible]) { [popoverController dismissPopoverAnimated:YES]; }