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-15-2008, 08:41 PM   #1 (permalink)
New Member
 
Join Date: May 2008
Posts: 38
torynfarr is an unknown quantity at this point
Default UIStatusBar Area Not Touchable

I've seen a few people having this problem, but so far no one has been able to resolve it.

When you hide the UIStatusBar (either in the application delegate with this line of code: [application setStatusBarHidden:YES animated:NO]; or by making a boolean entry in the info.plist file) the area where the status bar would normally be displayed does not respond to touches.



In the screenshot above, the UILabel displaying the X and Y coordinates of the touch are updated on touch and when touchmoves begin. If I slide my finder to the left edge of the screen, it's a dead zone. X stops being updated at -59 or -60... which would leave about a 20 pixel wide dead zone.

-Toryn
torynfarr is offline   Reply With Quote
Old 07-15-2008, 08:59 PM   #2 (permalink)
New Member
 
Join Date: May 2008
Posts: 79
scottyelich is an unknown quantity at this point
Default q:

not to be a pain, but are you making your view be the application window size or the mainscreen size?

Scott
scottyelich is offline   Reply With Quote
Old 07-15-2008, 09:23 PM   #3 (permalink)
New Member
 
Join Date: May 2008
Posts: 38
torynfarr is an unknown quantity at this point
Default

Here is the code that creates the UIView from within my UIViewController. I've tried two different ways, neither seems to make a difference.

Code:
- (void)loadView {
	
	UIView *containerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
	containerView.backgroundColor = [UIColor redColor];
	containerView.clearsContextBeforeDrawing = YES;
	self.view = containerView;
	[containerView release];
	
}
Code:
- (void)loadView {
	
	UIView *containerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
	containerView.backgroundColor = [UIColor redColor];
	containerView.clearsContextBeforeDrawing = YES;
	self.view = containerView;
	[containerView release];
	
}
I think the issue has to be due to how I'm creating this view... but I'm baffled. Is the frame that initialize the UIView the incorrect one to use? From your question, it sounds like I'm initializing the UIView using the screen's frame instead of the windows.

-Toryn
torynfarr is offline   Reply With Quote
Old 07-15-2008, 09:29 PM   #4 (permalink)
New Member
 
Join Date: May 2008
Posts: 38
torynfarr is an unknown quantity at this point
Default

If it helps, here is the code from my AppDelegate that initializes the UIViewController.

Code:
// Set up the window and main view.	
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
mainViewController = [[MainViewController alloc] init];
[window addSubview:mainViewController.view];
	
 // Show the window.
[window makeKeyAndVisible];
-Toryn
torynfarr is offline   Reply With Quote
Old 07-16-2008, 08:58 AM   #5 (permalink)
Registered Member
 
Join Date: Jun 2008
Posts: 83
i.d3v1l is an unknown quantity at this point
Default

as far as i have programmed it...

in the touchesBegain method... do chk that where is the touch... if it is in the desire area le it work properly and if is in the area u want to restrict... return from there...


take care and all the best... do let me know if i have done some blunder

C ya
i.d3v1l is offline   Reply With Quote
Old 07-16-2008, 10:41 AM   #6 (permalink)
New Member
 
Join Date: May 2008
Posts: 38
torynfarr is an unknown quantity at this point
Default

Quote:
Originally Posted by i.d3v1l View Post
as far as i have programmed it...

in the touchesBegain method... do chk that where is the touch... if it is in the desire area le it work properly and if is in the area u want to restrict... return from there...


take care and all the best... do let me know if i have done some blunder

C ya
Actually, I'm not trying to restrict an area from being touched. Just the opposite. I want the area shown in blue in my screen shot to respond to a touch. The problem is - it doesn't. If I touch anywhere in that blue area, the event method touchesBegan does not get called.

-Toryn
torynfarr is offline   Reply With Quote
Old 07-16-2008, 06:34 PM   #7 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 17
AwayBBL is an unknown quantity at this point
Default

I noticed a similar effect when I used a webview with no status bar. If I show the status bar, the user can use it to scroll back to the top of the webview, but if I hide it, the area appears as dead to any touches. Maybe thats by design?
AwayBBL is offline   Reply With Quote
Old 07-17-2008, 01:01 AM   #8 (permalink)
New Member
 
Join Date: May 2008
Posts: 79
scottyelich is an unknown quantity at this point
Default verified

I get this same behaviour.. and I've verified that my frame is 320x480 @ 0,0.

Scott
scottyelich is offline   Reply With Quote
Old 07-18-2008, 11:52 AM   #9 (permalink)
New Member
 
Join Date: May 2008
Location: San Diego, CA
Posts: 79
cpatch is an unknown quantity at this point
Default

This is a known issue that's been around for a while. It even shows up in Apple's sample code...try dragging a square to the top of the screen in the Touches app. You'll notice that it drops when your finger gets to the bottom of the (hidden) status bar area. (It's more obvious in the simulator.)

Last edited by cpatch; 07-18-2008 at 11:54 AM.
cpatch is offline   Reply With Quote
Old 07-25-2008, 08:47 AM   #10 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 38
toom is on a distinguished road
Default

does anybody know if this problem only exists in the simulator?
toom is offline   Reply With Quote
Old 08-24-2008, 12:45 PM   #11 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 125
bhearn is on a distinguished road
Default

Quote:
Originally Posted by toom View Post
does anybody know if this problem only exists in the simulator?
Yes! The bug only exists in the simulator, oddly enough.

I put a button in the affected area, so that no part of it is touchable in the simulator, but it responds on the iPhone.
bhearn is offline   Reply With Quote
Old 12-22-2008, 12:42 PM   #12 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: London/Peterborough
Posts: 562
QuantumDoja is on a distinguished road
Default open gl es

This is not the case for me, with 2.2 this area is still inactive.
QuantumDoja 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



» 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 09:03 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0