Reputation: 55604
Supposedly this is a 10 by 10 square 100 pixels on the x axis from the origin and 100 pixels on the y axis from the origin (origin being the top left corner)
However it quite clearly wrong.
Writing the views frame to NSLog after setting it gives out the same values I put in.
Code:
ISScrollDock *bottomSV = [[ISScrollDock alloc] init];
[bottomSV.view setFrame:CGRectMake(100, 100, 10, 10)];
[bottomSV.view setBackgroundColor:[UIColor redColor]];
[self.view addSubview:bottomSV.view];
Here is an Xcode project to show my problem: http://www.qfpost.com/download.do?get=92f03538907e72665ea794d98ff8392b
Upvotes: 0
Views: 746
Reputation: 9708
Just add
test.view.autoresizingMask = UIViewAutoresizingNone;
because your view currently has autoresizingMask
on.
Upvotes: 2
Reputation: 3572
Uncheck "Autoresize Subviews" in your xib file.
Now, where's my cake? :P
Upvotes: 0
Reputation: 70733
Are you adding this scroll view to another view or scroll view which has been scrolled up? Check the frame location of the superview.
Upvotes: 0