1

I have implemented signaturepad for my ios application. (Its not a native application. I am developing using MVVMCROSS platform. I wish to set the orientation of this signature pad in landscape view always. I am unable to find any parameters for the signaturepad frame.

 var signature = new SignaturePadView(View.Frame);
 View.AddSubview(signature);
 signature.Frame = new RectangleF(0, 135, 320, 130);
 //signature.Frame = new RectangleF(0, 135, this.View.Frame.Width, 140);
 signature.BackgroundColor = UIColor.Gray;

I am not able to make sure that it always opens in landscape view and adjusts to the width of the screen. Would be glad if you anyone could help

Somu
  • 601
  • 11
  • 22
  • Check this out, http://stackoverflow.com/questions/19554036/mvvmcross-how-to-force-a-specific-orientation-on-mvxviewcontroller-in-ios-7-on – Pradeep Jun 23 '14 at 23:12

1 Answers1

0

Try adding following code to your ViewController of SignaturePadView

public override bool ShouldAutorotate()
    {
        return true;
    }

    public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
    {
        return UIInterfaceOrientationMask.AllButUpsideDown;
    }

It overrides orientation methods

Pradeep
  • 6,303
  • 9
  • 36
  • 60