2009-10-23 2 views
0

UITextView에 텍스트를 넣습니다. 이제 장치가 수평선이 될 때 내부 텍스트를 추가 공간을 차지하게하고 싶습니다. 그러나이 방법은 캔버스가 텍스트가 아닌 모든 공간을 채 웁니다.UIIextView에서 텍스트를 더 넓게 만드는 방법 UIInterfaceOrientationLandscapeRight로 회전

// This method is called by NSNotificationCenter when the device is rotated. 
-(void) receivedRotate: (NSNotification*) notification 
{ 
UIDeviceOrientation interfaceOrientation = [[UIDevice currentDevice] orientation]; 

if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft) 
{ 
    self.view.transform = CGAffineTransformMakeRotation(-M_PI/2); 
    self.view.bounds = CGRectMake(0, 0, 416, 320); 

답변

1

보기에 xibs 및 인터페이스 빌더를 사용하고 있습니까? 그렇다면 struts and springs을 사용하여 UITextView의 크기를 자동으로 조정할 수 있어야합니다.

그렇지 않은 경우 receivedRotate: 메서드에서 프로그래밍 방식으로 UITextView의 크기를 다시 설정해야합니다.

관련 문제