0
我注意到iOS 7.x中有一個奇怪的行爲,基本上我有一個「導航控制器」,它將我的應用程序的主頁設置爲「rootview控制器」。Segue在iOS7上不存在視圖
此外,我有另一種觀點,允許通過「uitableview」選擇數據庫。之後,主頁將開始下載數據庫。
當應用程序啓動時,它所做的第一件事就是顯示數據庫選擇的頁面。之後,在應用程序的不同視圖中,有按鈕可以取消選擇數據庫。
問題是,這在iOS 6.x上效果很好,但它不在iOS 7.x上。 我將在下面列出我使用的代碼,並提供適當的評論。
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if ([bridge needJump]) {//controllo il flag per forzare il salto alla schermata di scelta del db
[self performSegueWithIdentifier:@"goSelDB" sender:self];
}
else
{
hud = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:hud];
hud.delegate = self;
if ([bridge firsStart])//controllo il flag del primo avvio
{
if([bridge checkNetwork])//
{
[self downloadDbWithUrl:[bridge getDBUrl] andDestinationName:@"ristorante.sqlite"];
}
else
{
[self fillField];
UIAlertView *al=[[UIAlertView alloc] initWithTitle:@"Errore:" message:@"Per usare questa applicazione devi essere connesso a internet." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[al show];
}
[bridge setFirst:NO];
}
else
{
[self fillField];
}
}
}