Note that there are some explanatory texts on larger screens.

plurals
  1. POCoordinate calculation for popover view
    primarykey
    data
    text
    <p>In my app a button is placed at bottom of view controller.while clicking that button i need a popover view with a table view inside it displayed just above the button i placed.my problem is my popover view's starting position is at the top of my view controller.i need a small popover view just above that button.I use landscape mode . .</p> <pre><code> UIViewController *popoverContent=[[UIViewController alloc]init]; UIView* popoverView = [[UIView alloc]initWithFrame:CGRectMake( 265, 100, 400 , 800)]; popoverView.backgroundColor = [UIColor clearColor]; // popoverView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"mmf.png"]]; UITableView *table = [[UITableView alloc]initWithFrame:CGRectMake( 0, 0,400,800) style:UITableViewStylePlain]; table.backgroundColor=[UIColor colorWithRed:(107.0/255.0) green: (164.0/255) blue:(183.0/255) alpha:1]; [table setDataSource:self]; [table setDelegate:self]; [table setRowHeight:80]; [popoverView addSubview:table]; popoverContent.view = popoverView; // popoverContent.contentSizeForViewInPopover = //CGSizeMake(250, 665); self.popoverController = [[UIPopoverController alloc] initWithContentViewController:popoverContent]; [self.popoverController presentPopoverFromRect:popoverView.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; [self.popoverController presentPopoverFromRect:CGRectMake( 265,680,400,800) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES]; </code></pre> <p>I tried many values for the coordinates but its starting position is not where i want.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload