我将一些文本放入 UITextView。现在我想让内部文本在设备变为水平时占据额外的空间。但是这种方式只会使画布填充所有空间而不是文本。
// 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);