views:

56

answers:

3

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. alt text

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

A: 

Are you adding this scroll view to another view or scroll view which has been scrolled up? Check the frame location of the superview.

hotpaw2
its not actually a scroll view yet, and there are no other scroll views.
Jonathan
A: 

Uncheck "Autoresize Subviews" in your xib file.

Now, where's my cake? :P

Altealice
+1  A: 

Just add

test.view.autoresizingMask = UIViewAutoresizingNone;

because your view currently has autoresizingMask on.

tia
I fee kind of stupid now, thats what I get for trying to program for 15 hours
Jonathan
however I have another view that works like it should without setting autoresizemask.
Jonathan