在iOS 6中使用Apple图标 [英] Using Apple icons with iOS 6

查看:130
本文介绍了在iOS 6中使用Apple图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着iOS 6的发布,我想在这里重温原始问题:。


With the release of iOS 6 I'd like to revisit the original question here: Access to Apple's built in Icons?

For example, when you hit the 'action' button to share a photo, now instead of an action sheet with buttons titled 'Message', 'Mail', etc., now there is a collection view of the icons for mail, messaging, facebook, twitter, etc.

For a 'share' action in my app I'd like to be able to present the same - because it looks better and would provide a consistent user experience. Is the use of these icons still not allowed, even if they are referring to (and would take the user to) the apps they originally belong to?

解决方案

For just showing the share UI with icons, you probably want UIActivityViewController.

NSString* someText = self.textView.text;
NSArray* dataToShare = @[someText];  // ...or whatever pieces of data you want to share.

UIActivityViewController* activityViewController = 
        [[UIActivityViewController alloc] initWithActivityItems:dataToShare 
        applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:^{}];

It looks like:

Documentation here.

这篇关于在iOS 6中使用Apple图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆