Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-12-2008, 05:57 AM   #1 (permalink)
Yza
New Member
 
Join Date: Jul 2008
Posts: 5
Yza is an unknown quantity at this point
Default No touch events on hidden StatusBar place

Hi there!

Im playing arround SDK couple of weeks but I still have a problem with recognizing touch on whole screen size. I wanna make fullscreen app - so i call in my applicationDidFinishLaunching the lines for getting rid of the StatusBar and setting the UIWindow, UIView etc. (for assuring the UIView size I manually create myRect variable)

Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {	
	
	[application setStatusBarHidden:YES animated:NO];

	CGRect myRect=CGRectMake(0.0,0.0,320.0,480.0);
	
	window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
	mainView = [[MainView alloc] initWithFrame:myRect]; 
	[window addSubview:mainView];
        [window makeKeyAndVisible];

}

and now the problem - after all this ... I cant touch the place where the StatusBar was (rect from position 0,0 with height 20 pix and width 320 px).

my touchesBegan func inside the mainView
Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
{	
	UITouch *touch = [[event allTouches] anyObject];
	CGPoint location = [touch locationInView:self];
	
	NSLog(@"loc %f, %f",location.x,location.y);
}
if is the location.y<20.0 it just dont work.
Any ideas ? I saw some apps which obiously dont have problem with this. I spent a lot of hours on google to fix it but without result.

Thank you in advance!
Yza is offline   Reply With Quote
Old 08-08-2008, 10:14 AM   #2 (permalink)
Registered Member
 
Join Date: Jul 2008
Location: Minneapolis, MN
Posts: 208
Scuba is on a distinguished road
Default

Bump... having the same issue here.
Scuba is offline   Reply With Quote
Old 08-08-2008, 02:48 PM   #3 (permalink)
New Member
 
Join Date: May 2008
Location: San Diego, CA
Posts: 79
cpatch is an unknown quantity at this point
Default

You guys aren't alone...there are several threads discussing the same problem here and over on the Apple boards. They've been there since the SDK was in beta. I have yet to see a solution.
cpatch is offline   Reply With Quote
Old 08-08-2008, 09:43 PM   #4 (permalink)
I live @ iDevKit.com
 
Join Date: Jul 2008
Posts: 142
mxweas is an unknown quantity at this point
Default

You need to make the frame of your window/view after the status bar is gone. 0.0f,0.0f is just below the status bar when its there. So, removing the status bar won't change already drawn/initialized views. But if you make a view or change a view's frame after the status bar has been removed 0.0f, 0.0f will exist on a different part of the screen

Max
mxweas is offline   Reply With Quote
Old 08-09-2008, 01:04 AM   #5 (permalink)
New Member
 
Join Date: May 2008
Posts: 79
scottyelich is an unknown quantity at this point
Default didn't work for me.

I did this:

app make status bar disappear...
viewcontroller.view.frame = 0,0,320,480
window addsubview viewcontroller.view

my old frame for the view was 0,0,320,480 .. do I have to change it to
something else? (ie: does it check to see if the bounds are the same and
then just return.. let me check) nope... even when I changed the frame
to 10,10,50,50 and then to 0,0,320,480 .. still 20 dead pixels.

Scott
scottyelich is offline   Reply With Quote
Old 03-13-2009, 01:28 PM   #6 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 83
peterj is on a distinguished road
Default

Hi,

I am having the same problem.
Does anyone has the solution for this problem?

Thanks!
peterj is offline   Reply With Quote
Old 07-20-2009, 12:47 PM   #7 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 16
Iphonica is on a distinguished road
Question No touch events on hidden StatusBar place

hi..
we're having the same problem.
Did anyone find a solution for that?

we're using cocos2d and working on the simulator.
Is it only a simulator bug? or do we have "dead pixels" area?

appreciate your help

cheers!
Iphonica is offline   Reply With Quote
Old 08-28-2009, 09:38 AM   #8 (permalink)
New User
 
Join Date: Sep 2008
Posts: 9
unowen is on a distinguished road
Default

BUMP
unowen is offline   Reply With Quote
Old 09-20-2009, 01:57 PM   #9 (permalink)
App Developer
 
mongoose250's Avatar
 
Join Date: Dec 2008
Location: Indiana
Posts: 25
mongoose250 is on a distinguished road
Send a message via ICQ to mongoose250 Send a message via AIM to mongoose250
Default No touch events on hidden StatusBar place

It's a REAL conundrum! Apple gives you two methods for removing the StatusBar but provides no way to sense touch events in the 20 pixel vacancy. Thanks for listening and responding Apple!
mongoose250 is offline   Reply With Quote
Old 09-20-2009, 01:59 PM   #10 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Cocoa with Love: Intercepting status bar touches on the iPhone

Edit: nevermind. Misunderstood the issue.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 12-01-2009, 11:11 AM   #11 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 6
dbyers is on a distinguished road
Default has anyone found a workaround?

has anyone been able to find a workaround for this? i'm working on a UI that replaces the status bar with a custom toolbar.

it's so much faster to test in the simulator. guess the only workaround would be to lower the frame 20px for just simulator use.

please apple, help us out here.
dbyers is offline   Reply With Quote
Old 01-14-2010, 09:36 AM   #12 (permalink)
OMH
Registered Member
 
Join Date: Nov 2009
Location: Norway
Posts: 18
OMH is on a distinguished road
Default

I don't get any touch events when y<20, even when I'm on the device.
I tried various suggestions from forums, but still no change.
It's a full screen OpenGL app.

Can anyone explain this?
OMH is offline   Reply With Quote
Old 04-23-2010, 02:10 PM   #13 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 32
festival is on a distinguished road
Default

Quote:
Originally Posted by OMH View Post
I don't get any touch events when y<20, even when I'm on the device.
I tried various suggestions from forums, but still no change.
It's a full screen OpenGL app.

Can anyone explain this?

as far as i found out..it's a bug in the iphone-simulator

the device recognizes the area if the status bar is gone
festival is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch events from a Webview fasttech iPhone SDK Development 12 02-18-2009 04:44 AM
Best place to set initial values of viewcontroller? martinn iPhone SDK Development 6 06-30-2008 01:12 PM
Getting swipe events uprise78 iPhone SDK Development 0 05-28-2008 11:28 AM


» Advertisements
» Online Users: 311
7 members and 304 guests
blueorb, givensur, guusleijsten, jbro, mer10, n00b, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:59 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0