ios社交app源码

Today, I’m back to talk about two subjects that I love: social media and iOS development.

今天,我要回谈我喜欢的两个主题:社交媒体和iOS开发。

This article is aimed to inform non-technical people — such as designers, marketing, product owners, etc. — of the many possibilities when it comes to sharing with native iOS. While this article isn’t strictly technical, I will be sharing some development advice and code from my own GitHub repo.

本文旨在向非技术人员(例如设计师,市场营销人员,产品所有者等)告知与本机iOS共享的多种可能性。 尽管本文不是严格的技术文章,但我将分享我自己的GitHub存储库中的一些开发建议和代码。

As you already know, social media is extremely popular and widely used across the world and brings together an incredible amount of users. It is not surprising that this has become an essential tool for most businesses.

如您所知,社交媒体在世界范围内非常流行并得到广泛使用,并汇集了数量惊人的用户。 毫不奇怪,它已成为大多数企业的必备工具。

Although most social media platforms are available on most devices, the trend is that many users are increasingly accessing these platforms through a mobile device. Within a matter of seconds of taking a photo or screenshot, you can publish it as an Instagram story. It’s fast and simple… and as a company, you can make it even easier for your users.

尽管大多数社交媒体平台可在大多数设备上使用,但趋势是许多用户越来越多地通过移动设备访问这些平台。 在拍摄照片或屏幕截图的几秒钟之内,您就可以将其发布为Instagram故事。 它既快速又简单……作为一家公司,您可以使用户变得更加轻松。

Stakeholders, here’s what you can do!

利益相关者,这是您可以做的!

Before I start, I’d like to introduce you to the basics when it comes to sharing on mobile. To do this, go to ssense.com using Safari. You will notice a share icon similar to the following

在开始之前,我想向您介绍有关移动共享的基本知识。 为此,请使用Safari转到ssense.com 。 您会发现类似于以下内容的共享图标

at the bottom of the screen. Tap it, and you will see the native sharing sheet appear (image 1).

在屏幕底部。 点按它,您将看到本机共享表出现(图1)。

Image 1
图片1
Image 2
图片2
Image 3
图片3

The icons that appear will vary depending on the applications you have installed on your device and the preferences you have configured.

显示的图标会有所不同,具体取决于您设备上安装的应用程序和配置的首选项。

Click on the Messages icon, and you’ll see something similar to image 2. It allows you to share the link to the website via SMS or iMessage.

单击“消息”图标,您将看到类似于图像2的图像。它允许您通过SMS或iMessage共享网站链接。

If you click on the Mail icon, you’ll see something similar to image 3. It includes not only the link, but also some pre-filled fields like the subject — which uses some metadata of the web page.

如果单击“邮件”图标,您将看到类似于图像3的内容。它不仅包括链接,还包括一些预填充的字段,例如主题,该字段使用网页的某些元数据。

You can try and see what happens with other apps, but at the end of the day the experience is pretty much the same across all. This article does not explore website sharing customization; this will be the subject of another article.

您可以尝试查看其他应用程序会发生什么,但是最终,体验在所有应用程序上几乎都是相同的。 本文不探讨网站共享定制。 这将是另一篇文章的主题。

Wouldn’t it be cool to use this sheet for your application or even customize the shared content? Well, Apple makes it super easy. It’s called UIActivityViewController and has been available since iOS 6. You can customize the shared content by adding a different image, link, and personalized text for each application you want to share on. If you wish, you can include hashtags for content shared on Instagram, which you probably don’t want to do with an email. On some platforms, you’ll want to include an image too. In short, all this is possible with these native iOS sheets.

将此表格用于您的应用程序甚至自定义共享内容不是很酷吗? 好吧,苹果使它变得超级容易。 它称为UIActivityViewController ,自iOS 6开始可用。您可以通过为要共享的每个应用程序添加不同的图像,链接和个性化文本来自定义共享内容。 如果愿意,您可以为在Instagram上共享的内容添加标签,而这可能与电子邮件无关。 在某些平台上,您还将需要包含一个图像。 简而言之,这些原生iOS工作表都可以实现所有这些功能。

Since iOS 13, you can also customize the metadata displayed in the header of the sheet like the icon and the title.

从iOS 13开始,您还可以自定义工作表标题中显示的元数据,例如图标和标题。

Image 4
图片4

Moving on from Safari, I’ve created a small iOS project that demonstrates the possibilities with this native sheet. It’s available here, on GitHub.

从Safari继续,我创建了一个小的iOS项目,演示了此本地工作表的可能性。 它可以在GitHub上找到 。

This app only contains a share button, and when you click on it, it opens the native share sheet, seen in image 5.

该应用程序仅包含一个共享按钮,当您单击它时,它将打开本机共享表,如图5所示。

It contains almost the same content as Safari, but it is adapting to the content I’m sharing. In this example, I’ll share a custom text, URL, and an image at the same time.

它包含与Safari几乎相同的内容,但它正在适应我共享的内容。 在此示例中,我将同时共享自定义文本,URL和图像。

Image 5
图片5

The images above show how it looks for Messages and Mail. Although, I put the same exact text, image, and URLs for both of them, you can easily put something different for each app you want to share to.

上面的图像显示了“邮件和邮件”的外观。 尽管我为它们都输入了相同的确切文本,图像和URL,但是对于要共享的每个应用程序,您可以轻松地添加不同的内容。

Image 6
图片6
Image 7
图片7

But wait… there’s more! By default, you have many more options, known as Actions/Activities. For example, I have excluded the ability to save the image to Camera Roll, to assign the image to a contact and to print as they were not pertinent for my use case. You are probably wondering if it is also possible to add some custom activities. The answer is yes. In my project, I have created an Instagram activity that creates an image with the Apple UI component and shares it as a story on Instagram. Basically, we create an image, transform into data, and send it to Instagram using UIPasteboard. All the details about the implementation is available here on Github.

但是等等...还有更多! 默认情况下,您还有更多选项,称为“ 操作/活动”。 例如,我排除了将图像保存到“相机胶卷”,将图像分配给联系人并进行打印的能力,因为它们与我的用例无关。 您可能想知道是否还可以添加一些自定义活动。 答案是肯定的。 在我的项目中,我创建了一个Instagram活动,该活动使用Apple UI组件创建图像并将其作为故事分享到Instagram。 基本上,我们创建图像,转换为数据,然后使用UIPasteboard将其发送到Instagram。 Github上提供了有关实现的所有详细信息。

Image 8
图片8

In order to create a custom activity, you’ll need an image and an action text. In Image 8, I have put an Instagram logo and “Share story” because I want to share a story on instagram. While this article isn’t overly technical, I do want to give a quick overview of what the options to build the data to send to Instagram are. Instagram allows us to share a sticker image, a background image, a background top color, a background bottom color, and more.

为了创建自定义活动,您需要一个图像和一个操作文本。 在图8中,我放置了Instagram徽标和“分享故事”,因为我想在instagram上分享故事。 尽管这篇文章不是太技术性,但我还是想快速概述一下构建发送到Instagram数据的选项。 Instagram允许我们共享贴纸图像,背景图像,背景顶部颜色,背景底部颜色等。

In my example below, I have used an image of me as a sticker image and created a background image using only a swift component and a faded black and white color background.

在下面的示例中,我将自己的图像用作贴纸图像,并仅使用快速组件和褪色的黑白背景创建了背景图像。

Image 9
图片9

The sticker image can have some transparency included in the image. In my case, I just wrapped my photo in an image view, rounded the corner, and made the background transparent. For the background image, I’ve created a UIView with the size of the screen, set the background of the view, and finally included an image of a star at the position I wanted. The background image can’t have any transparency. Both of these images need to be converted into the Data type in order to be sent. What’s cool with both sticker and background images is that the user can interact with them independently.

贴纸图像可以在图像中包含一些透明度。 就我而言,我只是将照片包裹在图像视图中,将其弄圆了,并使背景透明。 对于背景图像,我创建了一个具有屏幕大小的UIView,设置了视图的背景,最后在想要的位置添加了一个星星图像。 背景图像不能具有任何透明度。 这两个图像都需要转换为数据类型才能发送。 贴纸和背景图像的优点是用户可以独立与它们交互。

Image 10
图片10
Image 11
图片11

The only things that are fixed — meaning you can’t interact with them — are the top and bottom faded background colors that you can see in image 11; only I can change both of these colors. I think I’ve covered all options that Instagram, and subsequently Facebook, have made available as of today in order to share on that platform. Oh wait, I think you can also share videos and a link (Beta)

ios社交app源码_iOS中的社交媒体集成相关推荐

  1. 一对一软件开发:在一对一社交app源码中加入这个功能,很有用...

    一对一软件开发在年内倍受欢迎,随着社交app的盛行,越来越多的人愿意涉足社交行业,但传统社交平台需要大量资金支持运营,而一对一直播社交平台由于其机制限制,对带宽使用较少.对平台能承受的并发量要求低.所 ...

  2. 游戏陪玩app源码开发中,摄像头的调用及视频处理

    摄像头是游戏陪玩app源码进行视频连麦时的重要移动设备之一,在开发时,我们需要实现游戏陪玩app源码对摄像头的调用权限,这就涉及到相关接口的开发了,不过今天我们主要来了解一下在游戏陪玩app源码开发中 ...

  3. 视频直播APP源码在安卓中推送SDK集成居然如此简单!

    视频直播APP源码在安卓中推送SDK集成居然如此简单! 思维导图 详细步骤 下载 demo 我的师傅大鸟哥告诉我,集成各类 SDK 的第一步骤都是下载个 Demo,先把 Demo 跑起来看看是什么鬼. ...

  4. 优化Recorder H5录音:可边录边转码上传服务器,支持微信提供Android IOS Hybrid App源码

    文章目录 一.Recorder H5录音库的特性 (1)浏览器支持 (2)功能支持 二.使用预览截图 (1)移动端H5 (2)IOS Hybrid App (3)Android Hybrid App ...

  5. 音乐社交APP源码ios版

    2019独角兽企业重金招聘Python工程师标准>>> 关于音乐曲库,对接的是百度音乐,会自动随搜索链接百度曲库 2.便捷聊天,采用xmpp基本架构. 3.加入和整理了群聊天. 4. ...

  6. ios html zfplayer,【iOS】ZFPlayer源码解读中

    前言 本篇继ZFPlayer源码解读基础之上,主要解析说明控制层与播放器,因为在上篇文章至现在并未提及丝毫关于这两个类业务的实现. 首先说下这两个类各自的职责. 控制层:主要负责响应与用户之间的交互, ...

  7. 布谷直播:仿富聊V聊、一对一社交APP、抖音短视频、社交APP源码

    不知何时起,周围的朋友们越来越热衷于讨论"直播"这个话题,几乎每个年轻人的手机里都多多少少有几个社交直播软件,不难发现,"全面娱乐"和"全民直播&qu ...

  8. 新版语音直播社交APP源码 多人连麦聊天/双端APP源代码 附编译说明

    功能介绍: 1.游戏陪练:可以选择当下火爆的游戏内容,选择游戏大神.职业玩家进行陪练,也可约附近路人玩家或是身边的小伙伴语音组队开黑,一起享受边玩游戏边吐槽的无限乐趣. 2.约玩交友:除了游戏陪玩功能 ...

  9. 2023最新语音直播多人连麦社交APP源码+支持双端/附编译安装说明

    正文: 完整标题: 功能介绍: 程序总共1.1GB,功能强大,有兴趣的自行去安装体验吧,其它就没什么好介绍的了 程序: wwergo.lanzoub.com/iInh60swepaf 图片:

  10. 完整的社交app源码android+laravel

    等想到写点什么的时候再写吧,其他看代码. https://github.com/huijimuhe/monolog-android https://github.com/huijimuhe/monol ...

最新文章

  1. 【Android动画】之Tween动画 (渐变、缩放、位移、旋转)
  2. Linux常用服务安装部署
  3. 如何在国内跑Kubernetes的minikube
  4. 如何下载百度文库的资料?
  5. eclipse里source的快捷方法_Eclipse开发必备快捷键
  6. ERP系统模块完全解析──工作中心
  7. 耳机使用说明书 jbl ua_用过JBL耳机后,才知道在运动领域BOSE和BO原来只是个弟弟...
  8. apt update无法连接上 127.0.0.1:10808
  9. 17 初探Context的使用场景
  10. 预登录握手失败_英雄联盟手游登录问题汇总
  11. C++中多态的基本概念以及虚表的基本概念
  12. python中线程里面多线程_Python中的线程和多线程是什么
  13. Python做下载器需要掌握哪些
  14. PhotoShop 基本知识
  15. Python地理数据处理 三:矢量数据的读写(一)
  16. 世界曾经有这样一个中国
  17. 哪些权重7权重8的网站怎么做的!我的站就是这么做的!轻量级泛目录无需数据库适合所有网站所有cms只需要放在根目录即可
  18. 命名实体识别学习记录(spaCy/OpenNLP..)
  19. ar 华为路由器 端口映射_求教华为AR2200路由器端口映射配置
  20. 从1到n的求和公式c语言excel,财务必学的10个最好用Excel求和公式!

热门文章

  1. 安卓音效AudioEffect源码剖析2——音效库接口
  2. 【软考】2019 上半年软件设计师 下午真题及答案
  3. 单片机编程软件 UV4启动界面修改(没啥卵用系列)
  4. Balrum 汉化指引
  5. linux Rootkit检查
  6. 数据恢复软件TOP 1—easyrecovery
  7. Carrot2对文章进行聚类代码示例
  8. windows下安装,配置gcc编译器
  9. 宝藏又小众的金属板材质贴图素材网站分享
  10. RSA因数分解工具yafu下载地址及使用方法介绍