在我的应用程序我试图使用滑块使用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,或者甚至可以将其自身(以幻灯片放映)替换为应用程序窗口的根。 –