Giter VIP home page Giter VIP logo

wqgameiconlabel's Introduction

WQGameIconLabel

算是一种特殊需求的图文混排吧。主要实现的功能是把数量不定的图片放在文字后面,然后设置最大行数文字可以实现尾部省略...

一、主要实现的功能

  1. 图片接在文字的后面
  2. 超过最大行数后,只有文字尾部变成“...”图片会完好的跟在后面
  3. 自动计算高度,适应autolayout。在自适应的时候尽量仿造了UILabel
  4. 实现了IB的预览

二、现存的缺陷

  1. 图片的高度必须小于或者等于行高,如果超出了就会出现高度计算错误,排版混乱的问题
  2. 图片的行数已经超出了最大行数的话,逻辑上并没有做任何处理,这里等待需求确定了后再写代码
  3. 在IB预览没办法把图片的预览也加进去,目前只能实现文字的预览效果
  4. 代码需要优化

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.