Tag: uipopovercontroller

UITableViewCell变得没有反应

我有一个popover屏幕,里面有: 一个标签,可能会或可能不会出现(标题) 一个search栏,可能会或可能不会出现 一个标签,可能会或可能不会出现,并有一个可变的高度(帮助标签) 一个可能或不可能出现的滚动视图,并且具有可变的高度(关于下表的一些信息) 一张桌子视图 为了呈现一些不错的东西,在viewDidLoad ,我移动了各种框架来正确放置对象,并且没有未使用的空间混乱我的popup窗口。 此外,我然后调整表(以获得最需要的地方),并通过contentSizeInPopover (避免有一个近乎空的巨大popover popover)的popup窗口。 所有resize似乎很好,但我有一个大问题:所有resize,我的UITableView的一些单元格变得没有响应。 一个或两个单元格,通常是第二个单元格,只有当我点击它们的外angular时才会作出响应,但是单元格的其余部分完全忽略了任何触摸。 我已经尝试了一切:移动所有viewWillAppear ,让autoresize做它的工作(似乎也不工作),但我仍然每次都有这个问题。 我发现,如果我评论涉及到更改表格frame或contentSizeInPopover中的问题,这个问题就会停止,但是我的视图被搞砸了,所以这不是一个修复。 如果有人能给我一些东西摆脱这个混乱,那将是非常棒的。 – (CGFloat)getHeightWithoutTable { (self.errorScrollView.hidden?0:self.errorScrollView。 frame.size.height + LIST_STD_SPACE); } – (void)viewDidLoad { [super viewDidLoad]; self.tableViewOutlet.backgroundView = nil; self.originData = [NSMutableArray array]; self.searchedData = [NSMutableArray array]; if(self.helper!= nil){ CGFloat heightOffset = 0; //内容 self.originData = [self.helper getData]; self.tableData = [NSMutableArray […]

UITableViewcell中的Popover不会立即生效。

我有一个dynamic的tableviewcontroller SideBarTableViewController.m / .h。 有一个popup视图控制器 – popUpViewController.m / .h已经子类化的SideBarTableViewController – > RegisterTableViewCell.m / .h单元格,并添加一个单元格的buttonsockets。 在storyboard中使用“present As popover”连接单元格到popUpViewController,segue被赋予标识符“popover”。 故事板中的定位点现在已设置为Tableview,稍后将在preparesegue中进行更改。 RegisterTableViewCell.h @property (weak, nonatomic) IBOutlet UIButton *PopoverAnchorButton; SideBarTableViewController.m #import "RegisterTableViewCell.h" (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([segue.identifier isEqualToString:@"popover"] && segue.destinationViewController.popoverPresentationController){ UIPopoverPresentationController *popController = segue.destinationViewController.popoverPresentationController; popController.sourceView = sender; RegisterTableViewCell *cell = [[RegisterTableViewCell alloc]init]; segue.destinationViewController.popoverPresentationController.sourceRect = CGRectMake(cell.PopoverAnchorButton.frame.size.width/2, cell.PopoverAnchorButton.frame.size.height, 0, 0); popController.delegate […]

iPad相机popover预览错误的旋转和缩放

我在popup窗口中显示相机(在iPad上 – iPad应用程序已locking到Lanscape左侧),预览是以纵向和错误的比例显示的。 下面的代码 – 我已经制定了旋转,并添加它,但预览大小是现在太薄。 UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.videoQuality = UIImagePickerControllerQualityTypeMedium; imagePicker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera]; CGAffineTransform transformRotation = CGAffineTransformMakeRotation(270 * M_PI/180); imagePicker.cameraViewTransform = transformRotation; } else { NSLog(@"Camera not available. Using photo library"); imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; } imagePicker.delegate = self; _photoPopover = [[UIPopoverController alloc] […]

显示UIPopOverPresentationController时崩溃

***终止应用程序由于未捕获的exception'NSGenericException',原因:'UIPopoverPresentationController(<_UIAlertControllerActionSheetRegularPresentationController:0x1a56bd90>)应该有一个非零的sourceView或barButtonItem在演示之前设置。

更改PopOverViewController的首选内容大小

我试图从childViewController中更改UIPopOverController的首选内容大小。 首先我以这种方式呈现PopOverViewController DateViewController *dateView = [[DatePickerViewController alloc] initWithNibName:@"DateViewController" bundle:nil]; UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:dateView]; m_tableCell = (NotesCell *)[m_tableView cellForRowAtIndexPath:indexPath]; popViewController = [[UIPopoverController alloc] initWithContentViewController:navController]; popViewController.backgroundColor = [[AppManager instance].themeManager navigationBarColor]; popViewController.delegate = self; //the rectangle here is the frame of the object that presents the popover, //in this case, the UIButton… CGRect popRect = CGRectMake(m_tableCell.customView.frame.origin.x, m_tableCell.customView.frame.origin.y, […]

popup窗口中的UITableView不会滚动

我正试图解决某人的代码,并遇到一个问题。 这是情况:我有一个全屏UIViewController有一个底部的栏button。 当我按下该button时,它会在屏幕左下angular显示一个popup视图控制器。 popup窗口中的视图控制器也有一个button,当我按THATbutton时,它将一个新的视图控制器到我的popup窗口。 这个新的视图控制器是一个UITableView,可以有大量的元素。 问题是,当我尝试向下滚动以查看一些离屏元素时,滚动会弹回到表中的第一个位置,即它不会真的滚动。 更具体的是这里是一些代码: 在FullScreenVC.h中: @property (nonatomic, retain) NSMutableArray* stuffInList; @property (nonatomic, retain) UIPopoverController *namePopover; @property (nonatomic, retain) UINavigationController *nameNav; @property (nonatomic, retain) UIBarButtonItem* addButton; 内FullScreenVC buttonPressed(按下addButton时调用): FirstPopupVC *vc=[FirstPopupVC alloc] initWithNibName@"FirstPopupVC" bundle:nil]; vc.delegate=self; vc.stuffInList=self.stuffInList; // This is just the NSArray of list items self.nameNav = [[[UINavigationController alloc] initWithRootViewController:vc] autorelease]; self.namePopover = [[[UIPopoverController […]

FPPopover不会popupbutton按下,只是NSLogs“FPPopoverController dealloc”

我有以下代码: – (IBAction)textOptionsTapped:(UIBarButtonItem *)sender { UIView *buttonView = [sender valueForKey:@"view"]; FPPopoverController *popover = [[FPPopoverController alloc] init]; popover.arrowDirection = FPPopoverArrowDirectionDown; [popover presentPopoverFromView:buttonView]; } 每当我按下button,究竟是什么导致我的应用程序NSLog“FPPopoverController dealloc”?

如何在UITableViewCell的标签中显示NSTimer的时间值

…继续问题如何在UITableViewCell中设置UIButton的Action 我有NSTimer在单身人士工作。 只有一个计时器,但它包含一个包含时间值的几个项目的词典。 每分钟计时器从字典中所有项目的时间值递减1。 字典的结构是: 键:“1”,值:与对象的数组NSString,NSInteger(时间值) TimerCell是一个tableViewControllers的单元格。 UITableViewController出现在UIPopoverController中。 所以我想在我的cell.label中显示字典的项目的时间值… 编辑:find方式 我已经创build了新的NSTimer在我的UITableViewController ,它始于viewDidLoad和每1秒采取新的价值单身的计时器,并显示它在我的cell.label … 如果这种方式不正确或有内存泄漏,请纠正我))

UIPopoverController for iPhone通过实施类别

我知道,Popover控制器是专门用于iPad设备,但在下面的问题有一个评论,其中用户提到有关类别,代码如下, UIPopoverController iphone不工作? // UIPopoverController+iPhone.h file @interface UIPopoverController (iPhone) + (BOOL)_popoversDisabled; @end // UIPopoverController+iPhone.m file @implementation UIPopoverController (iPhone) + (BOOL)_popoversDisabled { return NO; } @end 这是正确的吗? 苹果会批准这个吗? 我的iPad应用程序已经完成了,现在我正在将它变成通用应用程序,所以我不想使用任何自定义popup窗口来添加此类别,以便解决问题并减less开发工作量。

从UICollectionView的popup视图导致放松

我有一个显示在UICollectionView的数据matrix(玩家)。 当用户触摸一个单元格时,我需要在弹窗视图中显示一个玩家的细节。 我早些时候问过这个问题,然后才开始工作。 但从那时起,一个奇怪的问题就出现了。 当我触摸一个单元格,popup窗口出现,但主视图展开两个屏幕(!?)和应用程序崩溃与此错误: 终止应用程序由于未捕获exception'NSGenericException',原因:' – [UIPopoverController dealloc] popover仍然可见。 playerDataView内置在故事板中。 我已经在其头文件中声明了playerDataView控制器和popover视图控制器作为集合视图的属性: @property (strong, nonatomic) UIPopoverController *playerDataPopover; @property (strong, nonatomic) SWSPlayerDataViewController *playerDataView; 以下是实例化popover的代码: – (IBAction)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.row == 0 || indexPath.section == 0) { // Ignores user selecting row or column headers that I've placed in the collection view data return; […]