All Projects → liyuunxiangGit → Circleoffriendsdisplay

liyuunxiangGit / Circleoffriendsdisplay

朋友圈的做法

Projects that are alternatives of or similar to Circleoffriendsdisplay

Modelassistant
Elegant library to manage the interactions between view and model in Swift
Stars: ✭ 26 (-87.32%)
Mutual labels:  mvvm, mvc, tableview
Swift Design Patterns
🚀 The ultimate collection of various Software Design Patterns implemented in Swift [Swift 5.0, 28 Patterns].
Stars: ✭ 85 (-58.54%)
Mutual labels:  mvvm, mvc
Ios Architecture
A collection of iOS architectures - MVC, MVVM, MVVM+RxSwift, VIPER, RIBs and many others
Stars: ✭ 901 (+339.51%)
Mutual labels:  mvvm, mvc
Architecturesamplewithfirebase
これは、iOSアプリを色々なアーキテクチャで実装してみたものです。
Stars: ✭ 89 (-56.59%)
Mutual labels:  mvvm, mvc
Iosdesignpatternsamples
This is Github user search demo app which made by many variety of design patterns. You can compare differences in MVC, MVP, MVVM and Flux.
Stars: ✭ 622 (+203.41%)
Mutual labels:  mvvm, mvc
Tyto
manage and organise things
Stars: ✭ 662 (+222.93%)
Mutual labels:  mvvm, mvc
Ale
✌️a Flexible and fast JavaScript view framework
Stars: ✭ 67 (-67.32%)
Mutual labels:  mvvm, mvc
Androidarchitecture
Android Architecture using Google guides
Stars: ✭ 127 (-38.05%)
Mutual labels:  mvvm, mvc
Ios Design Patterns
Learning ground for iOS Design Pattern included with sample projects for MVC, MVP, MVVM, and VIPER
Stars: ✭ 120 (-41.46%)
Mutual labels:  mvvm, mvc
Jhform
JhForm - 自定义表单工具,更加简单,快捷的创建表单、设置页面
Stars: ✭ 108 (-47.32%)
Mutual labels:  mvvm, tableview
Androidquick
做外包用的快速开发库--微信、支付宝支付(含签名,下单)、自定义View(验证码/密码,九宫格图片上传等)、换肤、图片预览、RxJava、EventBus、JetPack、CameraX、base层封装等
Stars: ✭ 565 (+175.61%)
Mutual labels:  mvvm, mvc
Monkey
Monkey is an unofficial GitHub client for iOS,to show the rank of coders and repositories.
Stars: ✭ 1,765 (+760.98%)
Mutual labels:  mvvm, star
Westore
更好的小程序项目架构
Stars: ✭ 3,897 (+1800.98%)
Mutual labels:  mvc, mvvm
Ribs
Uber's cross-platform mobile architecture framework.
Stars: ✭ 6,641 (+3139.51%)
Mutual labels:  mvvm, mvc
Wtm
Use WTM to write .netcore app fast !!!
Stars: ✭ 3,403 (+1560%)
Mutual labels:  mvvm, mvc
mvcvm-swift-file-templates
Swift file templates for boosting mobile app development.
Stars: ✭ 16 (-92.2%)
Mutual labels:  mvvm, tableview
ios-architecture-example
Architecture pattern simple examples in iOS. You can compare differences in MVC, MVP, MVVM-Delegate and MVVM-Rx for same feature
Stars: ✭ 16 (-92.2%)
Mutual labels:  mvc, mvvm
mvc-tree
🌳 A chronological visualization of the family of MVC patterns.
Stars: ✭ 40 (-80.49%)
Mutual labels:  mvc, mvvm
Ios Architectures
Sample app for iOS architectures
Stars: ✭ 90 (-56.1%)
Mutual labels:  mvvm, mvc
Abexpandableview
Expandable, collapsible, filterable and single/multi selectable table view.
Stars: ✭ 138 (-32.68%)
Mutual labels:  mvvm, tableview

CircleOfFriendsDisplay

小项目还未完善,一直在更新,欢迎star   欢迎提bug以便改进 以便互相进步
朋友圈的做法

[TOC]

展示图

我的博客

运用MVC设计模式

MVC 是苹果公司最热衷的一种架构模式

  • M: model的缩写 模型层的简称
  • model层用来存放整个工程中需要的所有数据 (实体类的创建、数据的请求、数据持久性存储等操作都是写在model层的)
  • C: controller的缩写 控制层的简称
  • controller层用来将model上的数据显示在view上(controller层实时监控model上的数据变化 指挥view视图显示model上的数据)
  • 【注意】model层和view视图不能直接通信 必须借助controller层
  • V: view的缩写 视图层的简称
  • view层主要听从controller的指挥显示model层的数据

app中用到的MVC设计模式详解

  • 在ViewController控制其中,我么只做了两件事情
    • 1、通过数据请求的类GetInfoSection将数据请求下来保存在数组当中
    • 2、new一个viewZoneView并加载在该控制器当中,然后给该view传递数据过去。
      这样就可以做到隔离数据模型model 和view界面 遵循了低耦合的设计思想
-(void)getZonInfo
{
    //下方模拟的是数据请求  请求下来数组Info
    NSMutableArray *Info = [GetInfoSection getInfo];
    //将数据传到zoneView(这里传递的数据可以是身份信息,例如id)然后在zoneView中根据该id进行
    if (_zoneView == nil) {
        _zoneView = [[ZoneView alloc]init];
        _zoneView.translatesAutoresizingMaskIntoConstraints = NO;
        [self.view addSubview:_zoneView];
        [_zoneView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
        }];
    }
    _zoneView.zoneInfo = Info;
}

上下拉刷新功能

  • 上下拉刷新用的是MJRefresh
  • MJRefresh 点击看详情
  • //首页动态的下拉与上拉
          [_zoneTableView addHeaderWithTarget:self action:@selector(dynamicTableViewheaderRereshing) dateKey:@"ClassZonedynamicTableView"];
          [_zoneTableView addFooterWithTarget:self action:@selector(dynamicTableViewfooterRereshing)];
          _zoneTableView.headerPullToRefreshText = @"下拉刷新";
          _zoneTableView.headerReleaseToRefreshText = @"松开刷新";
          _zoneTableView.headerRefreshingText = @"正在加载";
          
          _zoneTableView.footerPullToRefreshText = @"加载更多";
          _zoneTableView.footerReleaseToRefreshText = @"松开加载";
          _zoneTableView.footerRefreshingText = @"加载中";
    

        _zoneTableView.fd_debugLogEnabled = YES; *```

  • 然后再dynamicTableViewheaderRereshing方法中进行数据请求,最终增加到总得数组中,然后tableView reloadDate.

消息传递的做法(我用的是推送:个推

  • 做朋友圈当然要进行消息的传递(例如评论,点赞等)
  • 我的想法就是当我们评论完成点击发送或者return的时候:
  • tableViewCell中的代理方法会被触发,然后在tableView界面进行操作:键盘收起
  • 然后会进行网络请求,将你要发送的内容发送到我们的服务器(在我们发送到服务器的同时,要进行本地的数据的刷新工作,是我们本地快速的显示出来)。
  • 再然后服务器会把网路传过去得东西通过苹果服务器给我们要发送的人推送过去。
  • 假如我们是接收消息的客户端,我们就会通过个推获得消息,然后进行分析,进行处理,最后放到数据库,然后做一个通知NSNotification.
      那么在控制器就会接受通知,然后通过- (void)onReceiveNewDynamic:(NSDictionary *)dic这个方法控制zoneView(就是tableview界面)的
      数据的刷新。
  • 基本就是这样一个流程,接下来讲讲推送。

新增小视频功能:

讲解小视频
image image image image

富文本的使用 TTTAttributedLabel

欢迎star

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].