0

My keboard appears in landscape but the ipad is in portrait and when in landscape appears in landscape

I have 2 xibs and in the landscape xib have the code in viewDidLoad:

 CGAffineTransform rotate = CGAffineTransformMakeRotation(1.57079633);
    [self.view setTransform:rotate];
Anirudh Ramanathan
  • 46,179
  • 22
  • 132
  • 191
Ladessa
  • 985
  • 4
  • 24
  • 50

1 Answers1

1

The answer lies in your question. you rotate your screen with your code.

CGAffineTransform rotate = CGAffineTransformMakeRotation(1.57079633); [self.view setTransform:rotate];

does exactly that. 1.57079633 is the same as M_PI/2, which is the same as 90°

delete the code or uncomment it like

// CGAffineTransform rotate = CGAffineTransformMakeRotation(1.57079633); [self.view setTransform:rotate];
headkit
  • 3,307
  • 4
  • 53
  • 99
  • but If I do this, the xib appears in wrong orientation – Ladessa Dec 14 '12 at 17:46
  • try http://stackoverflow.com/questions/2496554/easiest-way-to-support-multiple-orientations-how-do-i-load-a-custom-nib-when-th/2496719#2496719 – headkit Dec 17 '12 at 09:36