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)
Related
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.
for example if I have UIViewController , 50% is UIView, and 50% is UITableView.
can I show blur in UIView, of 25% part from uitableview ?
meaning, the UITableView is not behind the UIView, but tell the iOS to show the blur effect -like- is behind it ?
hope I'm clear here.
Are you trying to use a UIToolbar to give blur effect to a whole UIVIew/UITableView?
If that's what you're trying to do then the answer is yes, everything behind the UIToolbar will be blurred in-real-time.
So I was wondering if there's a way to make a UIView with a custom shape.
I'm trying to make a piano keyboard so when the user touches the view a delegate method responds by playing a noise. The picture is a .png with the picture of the key and a transparent background.
Thanks in advance.
You can't make a UIView in the shape of, say, a triangle, but what you can do is make the view transparent, then add your non-transparent content to it.
For example, to make a view with a background of a png (with, I assume, partially transparent areas) you could make a transparent UIView and then add an image view to it. better yet, just use a UIImageView in the place.
As the question title says, I want to display a light blue overlay on the UIWebView, when the UIWebview is loading and without blocking the user-interaction with UIWebView. Is it possible to get this effect?
Currently I am displaying a partially transparent ligh blue colored UIView over the UIWebView while the UIWebview is loading. But this blocks the user-interaction with UIWebView.
The technique I use for overlaying UIPickers should work and that is
1.Create a custom UIButton with the 'overlay' you want as the background.
I use a custom UIButton simply because it already has transparency but you could use an image view and set its background colour to clearColor.
2.set userInteraction = NO on the custom button
3.Add the custom UIButton over (in this case the web view) the view
Take a look at this answer. It's an answer to other problem, but should be very useful for your case.
Happy coding...
I have a custom view which I would like to look like a UINavigationBar. Is there a way for me to draw the background the same way a UINavigationBar would?
I don't want to draw an image or a gradient fill that looks like a UINavigationBar - I want to use the same library code (if it is public) that a UINavigationBar does to draw its background.
The drawRect: method of a UINavigationBar is private - you can't use it to draw the background of your own view.
The easiest way round this would be to take a screen shot, trim the image to nav bar size, add to your project, and then either draw the image in your view's drawRect: method, or add a UIImageView as a subview of your view.
Alternatively, would it be possible to use a UIToolbar instead of your custom view?
You could set your view background image and just use an image that has the navigation bar look already filled in.
As far as tapping into whatever the navBar uses to create itself, you are probably out of luck unless you just build a navBar into your app. Otherwise you would end up having to build a custom view at the top of your app, draw everything in manually. At that point, you are probably better off implementing the navBar.