Hi,
I pass the controller into the datasource e.g.
this._bikeList.DataSource = new TableViewDataSource (_list, this);
so that in the datasource I can pick up the orientation.
so this works
public TableViewDataSource (List<WizPR.Tables.tblRevision_Set> list,
rootBikeListiPad ReviseList) {
this._list = list;
this._reviseList = ReviseList;
}
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath
indexPath) {
if (_reviseList.InterfaceOrientation ==
UIInterfaceOrientation.LandscapeLeft | _reviseList.InterfaceOrientation ==
UIInterfaceOrientation.LandscapeRight) {
….
hope it helps.
ATB
Alex
On 18 Oct 2012, at 00:36, gratner <[email protected]> wrote:
>
> I'm running into an issue when a view needs to be aware of the current
> orientation. Before I was able to do the following:
>
> UIDevice.CurrentDevice.Orientation
>
> This does not seem to work in iOS6 (I'm on the iPad simulator) - it returns
> "Unknown".
>
> The controller has this.InterfaceOrientation, but the view can't access that
> directly. Does that have to be passed in from now on?
>
>
> Thanks,
> Greg
>
>
>
>
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Get-current-orientation-in-a-view-in-iOS6-tp4657530.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch