Does anyone know how to achieve a gaussian blur effect on an UIView in iOS6? Similar to twitter's #music app when the filter menu is open. (the background under the menu becomes blurred)
I wrote a library RWBlurPopover based on GPUImage that can achieve similar gaussian blur effect when presenting a popover. Supports both iPhone and iPad, and runs on iOS 5.1+.
Related
The title of the question speaks itself. For more assistance I would like to tell that my app has been developed using the Apple Photo Scroller(A modification of Apple's PhotoScroller sample code to load the UIPageViewController inside a UIViewController subclass
), with multiple image galleries. The problem is the pinch-to-zoom functions perfectly on ipad2 but not on retina iPads. My images are of size 2048x1536.
Can anybody tell me why the zoom is not working on retina iPads?
I would start by checking that the contentScaleFactor is set to 1.
From PhotoScroller's TilingView.m file:
// to handle the interaction between CATiledLayer and high resolution screens, we need to
// always keep the tiling view's contentScaleFactor at 1.0. UIKit will try to set it back
// to 2.0 on retina displays, which is the right call in most cases, but since we're backed
// by a CATiledLayer it will actually cause us to load the wrong sized tiles.
//
- (void)setContentScaleFactor:(CGFloat)contentScaleFactor
{
[super setContentScaleFactor:1.f];
}
See these related questions and answers here and here for more info on contentScaleFactor.
I am currently programmatically enabling fullscreen in an OS X 10.7+ app, via the techniques described in this apple guide, that uses OpenGL to renderer its views. Is it possible to enable per-frame screen updates during the full screen animation? Currently, it seems like a screenshot is taken before and after fullscreen is entered and there is an automatic alpha fade between the two.
I would like to instead redraw the content at every frame so that there is a smooth fade between the two sizes.
You probably want to look at the Custom Full-Screen Presentation Animations section in NSWindowDelegate documentation
So I'm still getting accustomed to the world of Auto Layout in iOS 6 and it's been a fun (or in plain English -- tough) migration coming over from strings & struts.
I have a UIImageView that's the background for a game I'm working on. Here's what a regular 3.5" Retina Display looks like in Interface Builder:
but if I change the "Size" pop-up in the Simulated Metrics field for the content view to "Retina 4 Full Screen", here's what I see:
And you can see the ugly black bar appearing along the bottom edge of the simulated iPhone 5 screen. This same ugly black bar makes it over to the compiled app running in the iPhone 5 simulator.
Are there any attributes or constraints I can apply via Interface Builder to get the UIImageView's frame to size correctly for the appropriate iPhone device screen size?
Or do I have to enter in constraints via code? (ugh)
I've watched the three WWDC videos and if the engineers covered the topic of sizing a view to fit a parent, they must have glossed over it really fast because I've haven't yet found or heard a decent method to get both UIImageView and NSImageView to size correctly to their parent views under both the iOS and MacOS side.
From what you're showing here, I think that what you want to do is drag the image to meet the bottom of the superview so that it takes up all of the space you want. On the bottom right in the IB view you will see a small, grey pill-shaped set of 3 buttons. Click the center one (once you have your imageView selected). It's the one that looks a little like this: |--|. It will bring up a list of constraints. Once you have done that, select "Bottom Space to Superview". You should then be able to switch between phones and have the image resize automatically.
I have an NSImageView in a view that utilizes Core Animation. Prior to using Core Animation the image looks fine but now its blurry and low quality. If I let NSImageView have a bezel border the issue goes away but I need it to have no border. Had this happened to anyone else?
Imgae in the background with no border, same image in the front with a border.
Thanks
EDIT: I forgot to mention that the image is an icon file (ICNS) so it has various sizes. The bordered view loads the correct size and the transparent one loads the smallest and stretches it.
Although not the way I wanted to, I managed to create a fix for the issue. The issue seemed to be the way that NSImageView was drawing the image so I created a custom NSView subclass with support for the same bindings I used in my original image view. Im not sure why the blurry-ness happend in the beginning, but drawing the image by hand in an NSView seems to do the trick.
Your image may be drawing in a non-pixel-aligned way. Have you tried shifting it by a half pixel?
Apple has a good demonstration of this in the BlurryView app in their "Cocoa Tips and Tricks" sample code.
Cocoa Tips and Tricks
I've been struggling over this for several days now and can't crack it. How do I achieve that neat photo cropping you see in iPhoto?
I tried using an NSImageView with a semi transparent CALayer allowing me to draw the cropping tool, but that doesn't work as the layer makes the image invisible (even though its transparency is set to 0.5).
I'm not asking for detailed code, just the global approach.
I found this outdated sample app from Apple which uses a subclass of NSImageView enhanced with cropping abilities. Although the project is based on PPC technology and it will not open in Xcode 4, the sources are exactly what I was looking for.