Camera controls iphone 4 blocked by overlayview - iphone

In my camera function i have an custom overlayview, its is a square in the middle of the screen. Works all fine on the iphone 3gs but if I am launching it on my iphone 4 im getting troubles with the button to switch to the front camera, somehow it gets blocked by the overlayview. How to fix this?
Thanks in advance,
Dave

Hay, same problem, but another solution:
your_overlay.backgroundColor = [UIColor clearColor];
your_overlay.userInteractionEnabled = NO;

Your overlay view is probably sitting in front of the camera controls in the view hierarchy.
Try setting the backgroundColor of your overlay view to something like [UIColor greenColor] and running your app to see if it is showing up over the camera control. If you see that your app's new green background color is covering the camera control, it means that your view is blocking input events to the control, even when your view's background color is clear. You'll need to resize and reposition your view's frame so it doesn't cover the camera control.
When you're done, just get rid of the line in your code where you're setting the background color of your view to green.

Related

Adding Background Image to FlowCover

I'm using FlowCover in an app and need to add a background, but inserting a UIImageView and sending to the back in .xib only gives me the background image and buttons and no coverflow animation. I also cannot see where i would programme a
self.backgroundColor = [[UIColor alloc]initWithPatternImage:[UIImage imageNamed:#"bground.png"]];
type thing in the implemetation.
Any clues?
It does appear that you can add an UIImageview to the ViewController's View in the MainWindow.nib:
In the editor dropdown you can send the image to the back. It means that the Flow Cover View MUST NOT be set to Opaque and then will sit on top of the ImageView.

Unwanted white background visible around UITableView when rotating from landscape to portrait

I have a UITableView in an iPad application that I am working on. When I start in a portrait view and rotate to landscape, the view rotates and the rotation looks good.
However, when I rotate from landscape to portrait, there is a white edge that is displayed during the rotation. It appears as though the UITableView is resized to fit the portrait display at the beginning of the rotation. (When rotating TO landscape, resizing first means that no white will be seen.)
Through a few screenshots that I have been able to grab, it appears that the animation order is as follows:
Resize UITableView
Perform rotation animation
Resize UIToolbar
While researching this, I found some people suggesting to change the UIWindow's background color to match your view (blue in this case), but my real UITableView does not have a solid color background, so this method is not sufficient.
I would like to be able to control when the rotation of individual views occur so that I can prevent this white border from being visible during rotation. Or if there is a better approach, please share that too!
[Edit] Here's a rough screenshot showing the white border during rotation:
Try to set the background color of the window layer to [UIColor blackColor]

can i change the black background of an iphone app?

My app is structured like this, a single MainWindow with window backgroundColor to white(which doesn't appear anywhere anyway), and in this nib i have a UINavigationController which doesn't seems to have a backgroundColor.
Any view controller is added from code and made from code and they have a gray background.
What happens is that when i rotate the iphone and the views are rotating as well, i see a black background under my views. Can this be changed? It looks ugly especially if i have a photo that is rotating in the same time with my gray background.
You need to use the embedded view in the UINavigationView
When you are your UINavigationview Class :
self.view.backgroundColor = [UIColor greyColor];
Or any other color you want.
Change the backgroundColor of UIWindow in the file 'MainWindow.xib'

Touch area changing on custom UIButton with image and title on landscape mode

I'm trying to build a button that looks like the icons on the iphone , with an image and a title bellow.I'm working in landscape mode.
I have a custom button on the IB with image and title and inside the code I use the methods :
[aButton setTitleEdgeInsets:UIEdgeInsetsMake(60.0, -50.0, 0.0, 0.0)];
[aButton setImageEdgeInsets:UIEdgeInsetsMake(-10.0, 29.0, 0.0, 0.0)];
my problem is that the area that react to the touch events is very small and is on the top left of the button , another problem is that if I change my button size I have to calculate again manually the values for these 2 functions.
Is there any easy way to do it?and if not how can I fix the touch area?
thanks
Gilad
well , I just removed the NIB file and created a new one and everything works just fine
Ran into this one as well, but didn't see the limited touch area until recently. Rebuilding the nib now and it's working. Thanks for plowing this ground.

Help with Open GL iPhone

I am trying to put an OpenGL View into my application but I want to make sure that before I do this that the view is transparent because I want to see and interact with the view behind it as well as the OpenGL View. Meaning I want to have something on an OpenGL View as well as the Image View behind it
You can have a view with a clear background and see the views behind it but you will not be able to have the user interact with the views that are behind.
Set the background color to [UIColor clearColor]