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

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
I am trying to fit a large width UIView inside a scroll view. 87600 to be precise.

when i do this, the view seems to disappear, but when i hard code the width to 1200 it appears, why is it so ? is there a max width for a view ?

i am setting the contentview size, and it seems to work though !

Code:
  CGRect rect = sv.frame;
    int rectwidth = rect.size.width / kMaxColsPerWindow;
    rect.size.width = rectwidth * count;
    [sv setContentSize:rect.size];
    rect.origin.x = 0;
    rect.origin.y = 0;
    viewLarge.frame = CGRectMake(0, 0, rect.size.width, rect.size.height);

regards

----------

with a bit trial and error i discovered that width 16384 works fine but 16385 makes it disappear !
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.