2012-07-23 187 views
3

我用这个去URL从视图:更改超链接按钮后,按

-(IBAction)linkButtonPressed:(id)sender { 
    [[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"url"]]; 
} 

我已经添加启动图像到项目命名为Default.png和[email protected]

现在,如果超链接是从进入视图(切换到SAFARI),并且该应用程序后重新从backgroundm运行输入的,则关闭这样的:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    [tableView deselectRowAtIndexPath:indexPath animated:TRUE]; 
    //The other cells here 
    else if(indexPath.row==4) 
    { 
    exit(0); 
    } 
} 

现在推出图像chancged到视图的链接按钮被按下的屏幕截图。如果我强制从iPhone的主屏幕关闭应用程序(链接输入后),启动图像为黑色。

如果我再进入从tableview中另一种观点认为,退出的超级链接,启动图像从该视图等变更为新截图..

是什么造成这个问题以及如何解决它?

Ps。在版本5.1.1的iPhone设备上运行应用程序 使用XCode 4

+0

我很感兴趣,你如何实现了“动态更改启动图像” ......我想实现类似,但根据用户在应用程式语言设置的东西。 – micadelli 2012-10-19 13:14:15

回答

1

这是因为当您进入Safari时,应用程序处于后台状态。为了防止这种情况发生,请关闭后台应用程序并快速切换应用程序。

How to disable fast application switching (multitasking) on iOS 4?

+0

谢谢! “UIApplicationExitsOnSuspend”现在是:“应用程序不能在后台模式下运行”。我也曾在info.plist中设置启动图像,否则它会变黑。 – ingenspor 2012-07-23 22:27:06

+0

但是如果我希望应用程序能够在后台模式下运行而不将我的启动图像更改为截图? – ingenspor 2012-07-23 22:33:21