在我的應用程序我試圖使用滑塊使用LWSlideShow LWSlideShow 圖像的來源從我的服務器嘗試解決方案後取回here我卡住了錯誤,說不平衡的呼叫這意味着我提出了一個模式的觀點,沒有完成他的動畫解決這個問題後,通過把動畫放在沒有splashView,我將出現在圖像下載之前將被解僱這裏是我的代碼作進一步解釋:顯示啓動畫面,而下載圖像從服務器在ios
- (IBAction)goDownload {
UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"Splash"];
[self.navigationController presentViewController:vc animated:YES completion:nil];
dispatch_async(dispatch_get_main_queue(), ^{
NSMutableArray *array = [@[] mutableCopy];
LWSlideItem *item = [LWSlideItem itemWithCaption:@""
imageUrl:@"http://code-bee.net/geeks/images/cover-1.jpg"];
[array addObject:item];
item = [LWSlideItem itemWithCaption:@""
imageUrl:@"http://code-bee.net/geeks/images/cover-2.jpg"];
[array addObject:item];
item = [LWSlideItem itemWithCaption:@""
imageUrl:@"http://code-bee.net/geeks/images/cover-3.jpg"];
[array addObject:item];
LWSlideShow *slideShow = [[LWSlideShow alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 120)];
slideShow.autoresizingMask = UIViewAutoresizingFlexibleWidth;
//slideShow.delegate = self;
[self.view addSubview:slideShow];
slideShow.slideItems = array;
if ([slideShow.slideItems count] == [array count]) {
[self dismissViewControllerAnimated:YES completion:nil];
}
});
}
//
//-(void)viewWillAppear:(BOOL)animated
//{
//
// UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"Splash"];
// [self.navigationController presentViewController:vc animated:YES completion:nil];
//}
- (void)viewDidLoad {
[super viewDidLoad];
[self goDownload];
}
你也可以從代碼中看到,我也嘗試使用viewWillAppear同樣的事情發生了什麼我wan t是什麼時候下載圖像splashView需要被解僱我不知道我在做什麼錯
可以提供有關如何解決我的問題 –
詳情哪一部分沒有我不解釋還不夠嗎? – danh
使該Splash vc成爲故事板中應用程序的初始視圖控制器。完成後,它可以呈現幻燈片放映vc,或者甚至可以將其自身(以幻燈片放映)替換爲應用程序窗口的根。 –