【发布时间】:2012-02-21 11:36:32
【问题描述】:
我是 iPad 开发人员的新手,
我使用Xcode 4.在目标c中创建了两个或三个iPad应用程序
但现在我想使用Monodeveloper 工具以C# 语言创建iPad 应用程序...
其中,我想在orientation 中移动我的tableView,
我在谷歌搜索,但我没有任何语法。
详情请看我的屏幕截图...
在第一张图片(纵向模式)中,我的桌子在extremeLeft,在第二张图片(横向模式)中,我希望我的桌子在最右边..
我该怎么做?
我以编程方式创建了 tableview,这里是代码 sn-p,
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
Gainer(); //method call
UITableView Table=new UITableView();
Table.Frame=new RectangleF(20,200,400,400);
Table.Source=new TableViewDataSource(TopGainer); //passing parameter to tableview datasource
this.View.AddSubview(Table);
}
public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
// Return true for supported orientations
return true;
}
我们将不胜感激。
提前致谢!
【问题讨论】:
-
我认为你应该通过 Montouch 教程 (ios.xamarin.com/Tutorials),如果你知道如何在 ObjC 中解决问题,你应该能够轻松地将它们翻译成 C#/Monotouch。跨度>
标签: iphone ipad uitableview xamarin.ios orientation