Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i can't seen to receive the CGPoint coordinates within the first 20 pixels of the Y coordinate, where the status bar should be.

i've used UIStatusBarHidden:YES in the property list, and have selected "none" for status bar of the window and resized the view, but it's just not registering. it's as if the status bar is still there, albeit hidden, and not allowing core graphics to access that space.

i've attached the project. click and drag to the top of the screen and you'll see the Y coordinate will stop at 21, as well as not give any feedback if clicking within the top space.

is this normal?

is there no explanation for this? perhaps an oversights on my part?
 

Attachments

  • TouchExplorer.zip
    20.5 KB · Views: 109

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
what's the size of your UIWindow? is it 320 by 480?

window is 480, view was 460 but even with changing the view to 480 i still receive no response when dragging up to the first 20 pixels of the display (which is usually reserved for the status bar).

seems to be a tricky one. unexpected behavior for UIStatusBarHidden:YES.
 

BlackWolf

macrumors regular
Apr 9, 2009
244
0
window is 480, view was 460 but even with changing the view to 480 i still receive no response when dragging up to the first 20 pixels of the display (which is usually reserved for the status bar).

I'm currently not on my mac so I can't test the project you uploaded, I will test it tomorrow though.

did you ever try putting a UILabel or something at 0,0 on your ViewController's view and see if it is drawn correctly? because I still think if your view would work correctly than the touches should as well
 

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
I'm currently not on my mac so I can't test the project you uploaded, I will test it tomorrow though.

did you ever try putting a UILabel or something at 0,0 on your ViewController's view and see if it is drawn correctly? because I still think if your view would work correctly than the touches should as well

the UIView and UILabels appear within this space fine. the space just isn't responding to touch methods.

it's very strange.
 

xsmasher

macrumors regular
Jul 18, 2008
140
0
You can't seem to detect touches in the area where the status bar used to be? That's a bug in the simulator; should work like a champ in on the actual device.
 

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
You can't seem to detect touches in the area where the status bar used to be? That's a bug in the simulator; should work like a champ in on the actual device.

humm, i never though of that possibility. unfortunately i don't yet have access to test my code on my device. would be great if someone with access could test it using the attached code above to see if that's truly the reasoning behind this mystery.
 

mackiethemacmac

macrumors newbie
Jun 9, 2009
5
0
Same Problem On Device

I am having the exact same problem with one of my projects, and i first discovered it on the device, so it's not a simulator issue. I would really like to get a fix for this.
 

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
changing the app delegate's applicationDidFinishLaunching method to the following doesn't seem to fix the error

Code:
[COLOR="DarkGreen"]//from this[/COLOR]
[window addSubview:viewController.view];

[COLOR="DarkGreen"]//to this[/COLOR]
[window insertSubview:viewController.view atIndex:0];

and neither did adding another view to host the view controller's view (touch view):
Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application
	{    
	CGRect aFrame = [[UIScreen mainScreen] bounds];
	UIView *aView = [[UIView alloc] initWithFrame:aFrame];
	baseView = aView;
		
	[window addSubview:baseView];
	[aView release];

	[baseView addSubview:viewController.view];
	[window makeKeyAndVisible];
	}

under normal situations it wouldn't have made any difference, but since this seems to be a bug i gave it a shot. unfortunately, the mystery continues.
 

mackiethemacmac

macrumors newbie
Jun 9, 2009
5
0
Wrong

^^^That post addressed something different^^^^^.

Just to clarify this is NOT a simulator issue - confirmed!

I have seen apps that recieve these touches. These apps may have used OpenGL which may fix the prob.

Will anyone who knows the answer kindly share? I gave up on this bug months ago.
 

mackiethemacmac

macrumors newbie
Jun 9, 2009
5
0
^^^^^ nice try but....

Before I gave up on this I tried the above link: Nice info, I learned some stuff but ultimately apple will not accept apps that subclass uiapplication! It would apear as if there is some other means of achieving this goal.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.