iphone - How can i create a horizontal view -
i don't want change view when user rotate device, , need view horizontal when initialized.
- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { return no; } - (void)viewdidload { [super viewdidload]; [self.view settransform:cgaffinetransformmakerotation(m_pi / 2)]; uiview *myview = [[uiview alloc] initwithframe:cgrectmake(0, 150, 768, 500)]; myview.backgroundcolor = [uicolor bluecolor]; [self.view addsubview:myview]; }
the problem view not close left side when app start. still have blank space. frame set cgrectmake(0, 150, 768, 500), don't know reason. thanks!
i can't tell question, but: if want view in landscape mode, want try following code:
- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { return (interfaceorientation == uiinterfaceorientationlandscapeleft); }
Comments
Post a Comment