当我点击下载按钮时,需要很长时间才能进入下一个屏幕

时间:2012-07-07 10:08:14

标签: iphone

我是iphone的新手,我有一点怀疑。我正在开发audioPlayer项目在我的屏幕上我有一个按钮下载 这是my initial screen having an download button in top right corner

的屏幕

当我们点击下载时,此代码执行

  • (IBAction)gotoProgressViewController:(id)sender { @try {

    //ShowProgressViewCont is initialized with the nibName
    showProgressViewController = [[ShowProgressViewCont alloc]initWithNibName:@"ShowProgressViewCont" bundle:nil];
    
    //UINavigationController is initialized with the rootViewController showProgressViewController
    navigationController = [[UINavigationController alloc]initWithRootViewController:showProgressViewController]; 
    
    //The transition style of the navigationController is set to UIModalTransitionStyleCrossDissolve
    navigationController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    
    //Presents a modal view managed by the given view controller to the user.Here navigation Controller that manages the modal view.
    [self presentModalViewController:navigationController animated:YES];
    

    } @catch(NSException * e){NSLog(@“Exception At:%s%d%s%s%@”, FILE LINE PRETTY_FUNCTION < /强>,功能下,E);} @最后{} }

然后点击下载后需要5到6秒才能显示下一个

的屏幕

when we click download button in initial screen it will appears this screen

这里最初包含下载图像

我的实际问题是,当我们在2或3秒内点击初始屏幕中的下载按钮时我们可以减少反应时间我想要第二个屏幕

1 个答案:

答案 0 :(得分:1)

是的,您可以通过在第二个帖子上下载图片来缩短下载时间,请考虑此示例lazy table

它在第二个线程上下载图像,增加了应用程序的响应能力