GithubHelp home page GithubHelp logo

nuplay / expandabletext Goto Github PK

View Code? Open in Web Editor NEW
70.0 3.0 12.0 25 KB

Expand the text with the "more" button.(SwiftUI)

License: MIT License

Swift 100.00%
swiftui swift text uicomponent swiftui-components string swiftpackagemanager

expandabletext's Introduction

expandabletext's People

Contributors

nuplay avatar serhatemirates avatar wacumov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

expandabletext's Issues

Text is being repeated when view is in the collapsed state with the "more"

To reproduce this error you will need to enter a very long piece of text. For me I used:

How to win Friends and Influence People:
I gave myself the challenge in the year of 2022 to read more. My goal is to read 1 book a month, so 12 books by the end of the year. I just finished this classic book. This has been overdue on my reading list for a while, and I’m so glad I read it. There are so many
valuable lessons that help with how you communicate with people. Some of my favorites include:

  1. Be heavy on your praise and avoid criticizing.
  2. Talk about what people enjoy and are interested in, instead of talking about what I’m interested in all the time.
  3. Avoid an argument in the first place. Nothing productive is done once people are in the mindset of an argument.
  4. Be genuine with compliments. Really think what’s something about them that you really admire and then let them know.
  5. Put yourself in their shoes, appreciate and understand the world the way others see it. At the end of the day we are a product of our environments, and given a different situation or circumstance you might hold the same views as the person you think is wrong.
    P.S. - This book is definitely one that really needs to be read multiple times to internalize the messages. In addition, these mindset changes need to be actively practiced to properly develop. I will definitely need to work on this still.

^Try this text out with the Expandable Text and it will cause the bug of repeating text.

Changing Font doesn't work

I want to use other system font in the Text e.g. callout
Changing the font is showing read more button even in one line.
Any fixes to this?

Too long text description not working | Around 2000 lines

Hello Author,

Thank you for this Wonderful library.

I have just identified an issue.
When the text is too long (around 2000 lines) the Text showing only 1 line with Read More button.
When tapping on Read More it is expanding but up to certain limit not entire 2000 lines.

Can you please check this scenario at your end and provide solution ASAP?
As I've integrated this library in live project, I need to provide solution as soon as possible.

Example text (which is not working)

Welcome all to the ChelseaFC Community here you can get the latest update on our players fan community groups Welcome all to the ChelseaFC Community here you can get the latest update on our players fan community groupsWelcome all to the ChelseaFC Community here you can get the latest update on our players fan community groupsWelcome all to the ChelseaFC Community here you can get the latest update on our players fan community groupsWelcome all to the ChelseaFC Community here you can get the latest update on our players fan community groups Welcome all to the ChelseaFC Community here you can get the latest update on our players fan community groups

Thank you,
Rashesh

Expanded | Collapse

Once expanded, How can I collapse?
e.g. I want to collapse on tap on label like toggle. Tap to expand and again tap to collapse.

Even I want different font and colour for read more button.

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.