UIScrollView with a background set to the blurred image - ios

I have a UIScrollView that shows certain images based on an index. When an image loads, I want to set the background of the UIScrollView to the blurred version of that image.
Right now I have a container view that houses the scrollView, and I've been trying to add a blurred subView to the container but it's not working out. If I just add the subview it gets rendered over the scrollView which id obviously no good, and If I add the subView and send it to back then I don't see any blurred effect at all.
Is this the right approach or is there a better way to achieve the effect I'm going for?

As you said "and If I add the subview and send it to back then I don't see any blurred effect at all."
To sort it out, You may try changing the background color of Scrollview to clearColor.

Related

why does my UIView background distort when segued to next view?

I have a background image and a visual blur effect layer on top of that image placed behind all the Views in my storyboard. Whenever I segue to the next view, my background does this sort of gyrating/quivering gesture distorting it for a second, then returns to its regular state. This only happens when I segue to a new view, not when I go back to previous views. Does anybody know why this is occurring?
UIVisualEffectView does not like being animated or it's opacity being changed. I believe it has to do with its optimizations for blur efficiency. Try setting the layer's shouldRasterize property.

Image Positioning when resizing

I have an image that is 1000x134 referred to as logo
I have an UIImageView that contains that logo as AspectFit
I have another view in the back
The user is allowed to pan, pinch, and rotate the logo to position it where ever they want on top of the background view
After they have positioned the logo, I then increase the size of the background view
Problem: After the background view's size gets increased, the position of the logo gets messed up.
Question: How do I scale the logo with the background view in order for it to appear in the same position?
You should make the UIImageView a subview of your background view. That would make it easy to resize the whole view, perhaps using self.view.transform.

Overlaying view with remove button

I have searched high and low, and maybe because of not defining the problem correctly, I can't seem to figure out how to achieve the following:
I want to add a overlaying transparent view with a remove button. Any thoughts or tutorials I can use?
I have looked at the following but I want to have it fullscreen with a remove button:
How to Implement a Cool Alert/Information Overlay on iPhone?
Just create a new UIView (let's call it OverlayView) in interface builder, with the size of the main view, and above the others, with clearColor background color. Inside that UIView put an UIImageView with the overlay image (it has to be a semi transparent png) and UIButton for closing (on tap remove the OverlayView from superview)

Scrollview Delay / Lag in pageControl

We are building an iPad catalog application with images. The image scrolling is very smooth (no delay) using scrollview, however the corresponding the pageControl (small dots at the bottom) take an extra 1.5 sec approximately. Please see attached screenshot.
Is there a way to minimize this lag/delay? Thank you for your help.
What I'm getting from your question is horizontal scrolling (using the Page Control) is lagging/choppy. Run your app on the simulator, and from the 'Debug' menu, click 'Color Blended Layers'. This option will highlight any transparent object in red. Optimally, everything would be green. Try making everything red green by setting its background color to the background color of its superview, if that is possible and setting the view's opaque setting to YES. Good luck. For more information: check out the the documentation.
What is happening, in your code, when you move to a new page? Are you pulling down any data, images, etc... ?
On a side note, I would look into both the ScrollView and PageControl to see how they rendered. It could be ScrollView is using Bitmap images once the views are rendered and PageControl is not.

Titanium TableViewRow removes background color of subview when selected

I have a custom TableViewRow with a subview for an image. The imageView is inside a container so I can display the image as a square. The container has a white background and the image may not fill the container view. I removed the image from the container to explain the problem better. Please see the images below.
As you can see, when the bottom row is selected the background of the white square disappears. In my case, when the image is inside the container, the white color that fills the square is removed and I have a square border with a smaller image inside it.
Has anyone dealt with this before?
Thanks.
This is normal behavior for any table -- it changes the background color of all the subviews so it can show the selection highlight.
See this question for more details and work-arounds.
my suggestion here is to handle the selectionHighlighting yourself so you can manage how the views are rendered.
Once a row is selected, create you own method to set the background color of the individual views to give the visual experience you want. Remember to set the tableView so there is not highlighting on selection

Resources