从iPhone应用程序打开野生动物园的准则

从iPhone应用程序打开野生动物园的准则

本文介绍了从iPhone应用程序打开野生动物园的准则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

通过iPhone应用程序在野生动物园中打开网站是否有可用性指南?

Are there any usability guidelines around opening a website in safari from an iPhone app?

示例:我的应用程序中有一个按钮,点击该按钮会将用户带到safari中的网站-这将关闭我的应用程序并打开safari.

Example: I have a button in my app, that when tapped takes the user to a website in safari - this closes my app and opens safari.

对我来说,这样做似乎有点cr脚,而没有警告用户他们即将退出该应用并打开野生动物园.

To me, it seams kinda crappy to do this without warning the user that they are about to exit the app and open safari.

是否有任何用户指南规定应如何处理? IE.您应该提示用户并让他们知道吗?

Are there any user guidelines that state how this should be handled? I.e. should you prompt the user and let them know?

我找不到官方指南

推荐答案

-(void)openSafari
{
   UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"test"
                       message:@"this will open safari, you sure?"
                       delegate:self cancelButtonTitle:@"no"
                       otherButtonTitles:@"yes", nil];
              [alert show];
}


- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    NSString *title = [alertView buttonTitleAtIndex:buttonIndex];

    if([title isEqualToString:@"yes"]){
    [[UIApplication sharedApplication] openURL:
    [NSURL URLWithString:@"http://www.google.com"]];
  }
}

在您的头文件中.

 @class YourClass : SuperClass<UIAlertViewDelegate>

这篇关于从iPhone应用程序打开野生动物园的准则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 17:52