Message from discussion
ChildBrowser supportedOrientations
Received: by 10.224.220.12 with SMTP id hw12mr443945qab.8.1348105383008;
Wed, 19 Sep 2012 18:43:03 -0700 (PDT)
X-BeenThere: phonegap@googlegroups.com
Received: by 10.229.106.74 with SMTP id w10ls2591050qco.6.gmail; Wed, 19 Sep
2012 18:42:49 -0700 (PDT)
Received: by 10.224.27.14 with SMTP id g14mr455897qac.1.1348105369606;
Wed, 19 Sep 2012 18:42:49 -0700 (PDT)
Received: by 10.224.29.11 with SMTP id o11msqac;
Wed, 19 Sep 2012 12:10:59 -0700 (PDT)
Received: by 10.52.72.16 with SMTP id z16mr1030909vdu.15.1348081858985;
Wed, 19 Sep 2012 12:10:58 -0700 (PDT)
Date: Wed, 19 Sep 2012 12:10:58 -0700 (PDT)
From: Jake Williams <williamsja...@gmail.com>
To: phonegap@googlegroups.com
Message-Id: <8445af33-cf9b-4a81-883f-d1dd8ac10344@googlegroups.com>
In-Reply-To: <1db70e46-c632-4727-88c5-5a51fe2733be@googlegroups.com>
References: <1db70e46-c632-4727-88c5-5a51fe2733be@googlegroups.com>
Subject: Re: ChildBrowser supportedOrientations
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_82_1495230.1348081858607"
------=_Part_82_1495230.1348081858607
Content-Type: multipart/alternative;
boundary="----=_Part_83_6605050.1348081858607"
------=_Part_83_6605050.1348081858607
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
NSMutableArray* supportedOrientations = [NSMutableArray alloc];
if ([cont supportsOrientation:UIInterfaceOrientationPortrait]) {
[supportedOrientations addObject: [NSNumber numberWithInt:
UIDeviceOrientationPortrait]];
}
if ([cont supportsOrientation:UIDeviceOrientationPortraitUpsideDown]) {
[supportedOrientations addObject: [NSNumber numberWithInt:
UIDeviceOrientationPortraitUpsideDown]];
}
if ([cont supportsOrientation:UIDeviceOrientationLandscapeLeft]) {
[supportedOrientations addObject: [NSNumber numberWithInt:
UIDeviceOrientationLandscapeLeft]];
}
if ([cont supportsOrientation:UIDeviceOrientationLandscapeRight]) {
[supportedOrientations addObject: [NSNumber numberWithInt:
UIDeviceOrientationLandscapeRight]];
}
childBrowser.supportedOrientations = supportedOrientations;
Haven't been able to test yet because I incorrectly installed cordova 2.1
or something, but this got rid of the error (and let me see that I messed
up elsewhere).
On Sunday, September 16, 2012 10:38:02 PM UTC-5, IC wrote:
>
> I am using Cordova 2.1.0rc2 with childBrowser plugin.
>
> I have copied newer version of cordova AppDelegate and MainViewController
> classes to my project and have this error:
> property 'supportedOrientations' is not found on object of type
> CDVViewController.
>
> If I comment out the line, the childBrowser does not rotate.
>
> Can you please outline the steps I need to take to rectify this problem,
> including the correct childBrowser plugin location that can be used with
> 2.1.0rc2.
>
> Thanks
>
------=_Part_83_6605050.1348081858607
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<p class=3D"p1"><span class=3D"s1">NSMutableArray</span>* supportedOrientat=
ions =3D [<span class=3D"s1">NSMutableArray</span> <span class=3D"s2">alloc=
</span>];</p>
<p class=3D"p2"><span class=3D"s3"> </span><span class=3D"s4">=
if</span><span class=3D"s3"> ([cont </span><span class=3D"s5">supportsOrien=
tation</span><span class=3D"s3">:</span>UIInterfaceOrientationPortrait<span=
class=3D"s3">]) {</span></p>
<p class=3D"p2"><span class=3D"s3"> [supportedOr=
ientations </span>addObject<span class=3D"s3">: [</span><span class=3D"s1">=
NSNumber</span><span class=3D"s3"> </span>numberWithInt<span class=3D"s3">:=
</span>UIDeviceOrientationPortrait<span class=3D"s3">]];</span></p>
<p class=3D"p1"> }</p>
<p class=3D"p2"><span class=3D"s3"> </span><span class=3D"s4">=
if</span><span class=3D"s3"> ([cont </span><span class=3D"s5">supportsOrien=
tation</span><span class=3D"s3">:</span>UIDeviceOrientationPortraitUpsideDo=
wn<span class=3D"s3">]) {</span></p>
<p class=3D"p2"><span class=3D"s3"> [supportedOr=
ientations </span>addObject<span class=3D"s3">: [</span><span class=3D"s1">=
NSNumber</span><span class=3D"s3"> </span>numberWithInt<span class=3D"s3">:=
</span>UIDeviceOrientationPortraitUpsideDown<span class=3D"s3">]];</span></=
p>
<p class=3D"p1"> }</p>
<p class=3D"p2"><span class=3D"s3"> </span><span class=3D"s4">=
if</span><span class=3D"s3"> ([cont </span><span class=3D"s5">supportsOrien=
tation</span><span class=3D"s3">:</span>UIDeviceOrientationLandscapeLeft<sp=
an class=3D"s3">]) {</span></p>
<p class=3D"p2"><span class=3D"s3"> [supportedOr=
ientations </span>addObject<span class=3D"s3">: [</span><span class=3D"s1">=
NSNumber</span><span class=3D"s3"> </span>numberWithInt<span class=3D"s3">:=
</span>UIDeviceOrientationLandscapeLeft<span class=3D"s3">]];</span></p>
<p class=3D"p1"> }</p>
<p class=3D"p2"><span class=3D"s3"> </span><span class=3D"s4">=
if</span><span class=3D"s3"> ([cont </span><span class=3D"s5">supportsOrien=
tation</span><span class=3D"s3">:</span>UIDeviceOrientationLandscapeRight<s=
pan class=3D"s3">]) {</span></p>
<p class=3D"p2"><span class=3D"s3"> [supportedOr=
ientations </span>addObject<span class=3D"s3">: [</span><span class=3D"s1">=
NSNumber</span><span class=3D"s3"> </span>numberWithInt<span class=3D"s3">:=
</span>UIDeviceOrientationLandscapeRight<span class=3D"s3">]];</span></p>
<p class=3D"p1"> }</p>
<p class=3D"p3"><span class=3D"s3"> </span>childBrowser<span c=
lass=3D"s3">.</span>supportedOrientations<span class=3D"s3"> =3D supportedO=
rientations;</span></p><p class=3D"p3">Haven't been able to test yet becaus=
e I incorrectly installed cordova 2.1 or something, but this got rid of the=
error (and let me see that I messed up elsewhere).</p><br>On Sunday, Septe=
mber 16, 2012 10:38:02 PM UTC-5, IC wrote:<blockquote class=3D"gmail_quote"=
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-=
left: 1ex;">I am using Cordova 2.1.0rc2 with childBrowser plugin.<div><br><=
/div><div>I have copied newer version of cordova AppDelegate and MainViewCo=
ntroller classes to my project and have this error:<div>property 'supported=
Orientations' is not found on object of type CDVViewController.</div><div><=
br></div><div>If I comment out the line, the childBrowser does not rotate.<=
/div><div><br></div><div>Can you please outline the steps I need to take to=
rectify this problem, including the correct childBrowser plugin location t=
hat can be used with 2.1.0rc2.</div><div><br></div><div>Thanks</div></div><=
/blockquote>
------=_Part_83_6605050.1348081858607--
------=_Part_82_1495230.1348081858607--