-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can i change the post text without changing the icon #15
Comments
Can you explain it more? I did not understand what you meant. |
I have a uibutton pretext with an icon that will need to constantly be update now when this this update i dont want the icon to be update because this will remove the view and renter the view into the view again. this is what im using right now i want to update by doing this |
If you look at the source you'll see that the prefix, postfix and icon are all concatenated together with the various attributed string attributes for each. https://github.com/ranesr/SwiftIcons/blob/master/Source/SwiftIcons.swift#L321 So there is currently no way of changing just one of the 3 components, as the "settings" are not stored anywhere. The simplest solution would be to create a custom UIButton, that has the 3 component parts (maybe have a "text" and "attributes dictionary" for each part. Then use the @ranesr seems to have taken the simplest approach to integrate the icon's, which I prefer over bloated libraries with 100's of components to support all the various possibilities. So i'm not too sure whether such components would be a welcome addition to this library, or if it would better too "roll your own" library based on this one. Maybe ranesr can make his vision known for this library, so we know whether contributing back custom components is worthwhile, or if he prefer's too keep things simple. |
i have a button but i want to change the post text only not the button how can i complete that
The text was updated successfully, but these errors were encountered: