Giter Club home page Giter Club logo

uitextview-'s Introduction

/* 功能:      参考yykit 大神和谷歌上面大神的文档,感谢     #话题#和@功能实现, yykit 这个大神写的不错,但是不能整体删除,整体删除我看了新浪微博和今日头条,新浪微博虽然实现了#话题#和@功能,但是不能整体删除,导致了用户删除后再添加#话题#会出现正则匹配不正确的现象,大家可以看看,今天头条的是整体绑定和整体删除

 // 思路
      1:文字颜色(#话题#和@功能的颜色, 和普通字体颜色)  ,2:绑定(#话题#和@功能 整体绑定) 3:删除(#话题#和@功能整体删除)  4:(上传)
 
 
 //实现
    百度了一下,基本上很少,还是使用了谷歌,然后参照别人的**和内容进行填充,站在巨人的肩膀上是好的,也不用大规模造轮子
 
 
 //上传
 1:整个 textView 的文本内容当做 content
 2:用数组来存 id 并上传给服务
 @[
     @{@"name":@"#话题#",@"id":@"1"},
     @{@"name":@"#话题#",@"id":@"1"},
     @{@"name":@"#话题#",@"id":@"1"}
 ]
 3:通过MLEmojiLabel 显示  或者 yylabel 来显示,
 4:解析:   通过MLEmojiLabel 得到话题内容(text) 去遍历服务器给的
 对象  @{
             @{@"name":@"#话题#",@"id":@"1"},
             @{@"name":@"#话题#",@"id":@"1"},
             @{@"name":@"#话题#",@"id":@"1"}
     }
 
 得到 id 去请求
 
 到此,爬坑结束(泪崩)
 

 */

    //代码只是提供思路,没有做封装,也没有深入的去优化,希望用到的小伙伴能优化并做的更好,谢谢

uitextview-'s People

Contributors

986138497 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.