ScalingHeaderScrollView icon indicating copy to clipboard operation
ScalingHeaderScrollView copied to clipboard

Love this project. Is there a way to have a gradient background / transparent feel? will attach images.

Open waelsaad opened this issue 1 year ago • 6 comments

Great project. Thank you.

Is there a way to have one gradient background and hide the contents as you scroll up?

The third image is obviously the issue. :)

Thank you,

Wael

waelsaad avatar Aug 10 '22 05:08 waelsaad

Hey @waelsaad, thanks for your kind words. From the top of my head, I'd try something like applying the mask to the content view or even the whole ScalingHeaderView, to cut off the top part. If that fails, please share your code, and I'll be sure to see what I can do once I have time. Have a great day!

f3dm76 avatar Aug 10 '22 05:08 f3dm76

Thank you for the prompt response @f3dm76 I will give it ago and if it fails I'll send you an example project.

Have a nice day and best regards,

Wael

waelsaad avatar Aug 10 '22 05:08 waelsaad

Hi @f3dm76

It kind of worked but perhaps because I was using the mask incorrectly it stopped the card from collapsing!.

I have attached the modified code project, also one additional but final challange I have is I have created in the code a TopBar view which is a segmented control that I'd like to position just below the card , so when the user scrolls the card will collaps and the segmented control remains below it. If you know what I mean.

ScalingHeaderScrollView-master X.zip

Thanking you in advance. :)

Kind Regards,

Wael

waelsaad avatar Aug 10 '22 06:08 waelsaad

Uploaded project file correctly.

waelsaad avatar Aug 10 '22 07:08 waelsaad

Magic :] I just need to fix the background issue, if anyone has ideas please let me know, I will look into it tomorrow. Simulator Screen Recording - iPhone 13 Pro Max - 2022-08-11 at 18 20 02

waelsaad avatar Aug 10 '22 09:08 waelsaad

Updated.

waelsaad avatar Aug 11 '22 03:08 waelsaad

Hey @waelsaad, I have kind of sort what you wanted here. It is unfortunately based on fixed insets and one more background for which you'll have to "guess" gradient colors for it to look like one with the main background. I know it's not perfect, but yeah clipping and masks just break my poor component. Hope that helps ScalingHeaderScrollView-master.zip

f3dm76 avatar Oct 13 '22 09:10 f3dm76