tapkulibrary icon indicating copy to clipboard operation
tapkulibrary copied to clipboard

TKAlertCenter does not scale to the width of the given image

Open pulkitsinghal opened this issue 13 years ago • 2 comments

Hello,

The TKAlertCenter is cleverly designed to fit the width of the Alert based on the text and the height based on the image. But when the image width happens to exceed the text, then it would be nice to not have the image get clipped :(

Issue? Enhancement? Not sure which side of the line coin falls on, too subjective for my brain.

Feel free to tell me to fork off ;) but I think it would be nice to not have to fork for something so simple.

pulkitsinghal avatar Jan 21 '12 01:01 pulkitsinghal

I forked-off in order to make this happen & hopefully even contribute this issue(feature?) but I could still use some pointers.

I'm sprinkling a little extra on the top by also adding the option of letting the animated alert stay up for an infinite amount of time, until a user taps anywhere on the screen for it to be dismissed.

Yet I have no clue as to how to let the alert stay up indefinitely until the user taps.

pulkitsinghal avatar Jan 24 '12 23:01 pulkitsinghal

@devinross thanks for your awesome work on Tapku and sharing it with the rest of us.

I did some work to address the limitations that I perceived and defined above, the changes (if you deem them fit) can be assimilated from the fork here: https://github.com/pulkitsinghal/tapkulibrary/

Here's a summary of what was done: (1) If the image is too wide it SHOULD be scaled down to fit the width of the screen (2) Whoever is wider between the image and the message, SHOULD have its width be used as the status quo. (3) It SHOULD be possible to dismiss with a tap gesture.

I took great care to ensure that the work is easily assimilate-able :) https://meta-box.tenderapp.com/kb/development/keep-your-fork-in-sync-with-the-master

pulkitsinghal avatar Jan 25 '12 13:01 pulkitsinghal