ok, i notice something weird about your code.
any reason you are adding the size of the wide to the origin of aRect's x position?
aRect.origin.x += aRect.size.width;
im assuming you want this to be the top right corner....
You can uncomment the code in your .m file and make it like so:
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
Return YES; // for supported orientations
//otherwise return (interfaceOrientation == UIInterfaceOrientationLandscape); if you want only landscape mode.
}
Or what i would do in your situation if you want to layout your subviews is use the didRotateFromIntferfaceOrientation: like so:
(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
[self layoutSubviews];
}
and also layoutSubviews
- (void)layoutSubviews
{
NSLog(@"layoutSubviews called");
...recalc rects etc based on the new self.view.bounds...
}
It works like so.
PK