Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,704
6,296
I'm trying to add a UITableView to a UIAlertView, but I have the issue that it seems to be ignoring its frame property and drawing itself at full size...

I have this:
Code:
FriendSelectController *friendSelect = [[FriendSelectController alloc] init];
friendSelect.view.frame = CGRectMake(20.0, 40.0, 240.0, 120.0);
friendSelect.view.bounds = CGRectMake(20.0, 40.0, 240.0, 120.0);
friendSelect.view.clipsToBounds = YES;
[alert addSubview:friendSelect.view];

It only responds to touch events within the bounds, as it should, but it draws well past where it should. The origin is being placed in the correct location.
 
I'm trying to add a UITableView to a UIAlertView, but I have the issue that it seems to be ignoring its frame property and drawing itself at full size...

I have this:
Code:
FriendSelectController *friendSelect = [[FriendSelectController alloc] init];
friendSelect.view.frame = CGRectMake(20.0, 40.0, 240.0, 120.0);
friendSelect.view.bounds = CGRectMake(20.0, 40.0, 240.0, 120.0);
friendSelect.view.clipsToBounds = YES;
[alert addSubview:friendSelect.view];

It only responds to touch events within the bounds, as it should, but it draws well past where it should. The origin is being placed in the correct location.

You're trying to add a UITableViewController to your view. You shouldn't have 2 controllers in the same view. Add an actual UITableView to your view and it will behave just fine
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.