简体   繁体   English

在Swift(iOS)中使用水平滑动浏览Parse.com中的数据

[英]Browse data from Parse.com with horizontal swipe in Swift (iOS)

I have an app which fetches data from Parse.com. 我有一个从Parse.com获取数据的应用程序。 The data contains images and strings from different profiles. 数据包含来自不同配置文件的图像和字符串。 I want to load this data into a swipeable view, so the user can swipe left and right to view profiles of other users. 我想将此数据加载到可滑动的视图中,因此用户可以向左和向右滑动以查看其他用户的配置文件。

This is NOT a like/dislike app, I just want the user to view profiles which has been loaded and sorted by a global filter set by the user. 这不是喜欢/不喜欢的应用程序,我只是希望用户查看已由用户设置的全局过滤器加载和排序的配置文件。 The whole view consists of 1 user, so when the user swipes left or right, it can view a new user. 整个视图由1个用户组成,因此当用户向左或向右滑动时,它可以查看新用户。 If the user swipes back, it shows the user the same profile as before. 如果用户向后滑动,则向用户显示与之前相同的配置文件。

I've been searching on SO and Google, but couldn't find a fulfilling answer. 我一直在搜索SO和谷歌,但找不到令人满意的答案。 Some say that UIPageViewController can make this happen, others point to UIScrollView and UICollectionView. 有人说UIPageViewController可以实现这一点,其他人则指向UIScrollView和UICollectionView。

What is your take on this? 你对此有什么看法?

PS. PS。 I am planning on adding a new level of navigation on top of this. 我计划在此基础上添加新级别的导航。 So swiping left and right will make you browse users, swiping up will show you settings and swiping down your own profile. 因此,向左和向右滑动将使您浏览用户,向上滑动将显示设置并向下滑动您自己的个人资料。

Thanks! 谢谢!

-- Data that will be loaded from Parse.com backend -- - 将从Parse.com后端加载的数据 -

  • firstName 名字
  • lastName

  • profilePic 用户照片

  • birthday 生日

  • profileBio profileBio

您可以使用本教程获取想法: https//github.com/cwRichardKim/TinderSimpleSwipeCards

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM