I’m sure I’m missing something really basic here, but I’ve been trying to 
figure this out for several days without success:

I have a sequence of panels that I am displaying in a 
UIPopoverPresentationController. I am implementing this using a 
UINavigationController with a stack of panels.

The panel that is causing a problem is a UITableViewController. The problem is 
that the controller’s tableView retains the default height that the 
UINavigationController has (1024 in my case), rather than the height of the 
visible rectangle of the UIPopoverPresentationController. In other words, the 
presentation controller is acting like a clipping window through which the 
(unmodified) tableView is displayed.

This is a problem because tableView.scrollToRow(at: indexPath, at: .middle, 
animated: true) places the specified row at the middle of what it thinks is the 
tableView (i.e., around 512 in my case), rather than in the center of the 
revealed rectangle defined by the popup presentation controller. In this case, 
this means the the scrolled row is not visible.

Note that I am using a storyboard, specifying Content Size: Use Preferred 
Explicit Size.

What should I do to fix this problem? Must I explicitly resize the UITableView 
to fit the popover’s view? Is there any way to get the autoLayout system to do 
this for me? Has anyone else experienced a similar problem?

Or am I just stupidly overlooking a completely obvious step that I really OUGHT 
to know?

Cheers,

Rick Aurbach
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to