2013-09-16 18 views
0

我在iOS上使用原生MonoTouch.Dialog支持拉到刷新功能,但是由于iOS 7中的视图控制器可以全屏模式显示(导航栏下方和状态栏)“拉取到刷新”功能停止正常工作。MonoTouch.Dialog支持在iOS 7中拉到刷新

我试图在MonoTouch.Dialog.DialogViewController子类中使用TableView.ContentOffsetTableView.ContentInset属性,但我找不到任何定制点。 MonoTouch.Dialog.DialogViewController使用了很多私有常量/字段/类,这使得难以扩展它。

此外https://github.com/migueldeicaza/MonoTouch.Dialog看起来过时了。

是否有人使用MonotTouch.Dialog在iOS 7中成功使用Pull to Refresh功能?

+1

我有creat编辑一个[拉请求](https://github.com/migueldeicaza/MonoTouch.Dialog/pull/191)这个问题。 – holmes

回答

1

好吧,我突然意识到我的应用程序部署目标是iOS> = 6.x(我最近放弃了对iOS 5的支持),所以我可以使用UIKit的原生UIRefreshControl来代替,iOS 6和IOS 7 ;)。

+0

忘记提及http://conceptdev.blogspot.com.br/2012/09/ios-6-uirefreshcontrol-with-monotouch.html –

0

我有同样的问题,并有不同的解决方案。我是做了以下

public MyController() 
    : base(null) 
{ 
    RefreshRequested += MyController_RefreshRequested; 
    Root = new RootElement(null); 
} 

我立即调用ReloadComplete,这是不好不这样做

void MyController_RefreshRequested(object sender, EventArgs e) 
{ 
InvokeOnMainThread(
delegate 
    { 
    ReloadComplete(); 
    } 
} 

您需要刷新前等待的只是一点点......

void MyController_RefreshRequested(object sender, EventArgs e) 
{ 
    InvokeOnMainThread(
    delegate 
    { 
      Thread.Sleep(1000); 
      ReloadComplete(); 
    } 
} 

顺便说一句,原来的问题看起来像它是由bhomles固定在github上:https://github.com/migueldeicaza/MonoTouch.Dialog/issues/190