开发者

Prevent status bar from receiving touch events

开发者 https://www.devze.com 2022-12-22 09:25 出处:网络
Edit开发者_如何学JAVA After further testing, it appears that the part of my button that are not clickable are where the status bar used to be. I\'m hiding the status bar with :

Edit

开发者_如何学JAVA

After further testing, it appears that the part of my button that are not clickable are where the status bar used to be. I'm hiding the status bar with :

// -- Override point for customization after app launch    
[[UIApplication sharedApplication] setStatusBarHidden:YES];

Also added the Boolean value to my *-info.plist file:

UIStatusBarHidden=true

Which is awesome because it hides the status bar even as the window animates up. But it's still receiving touches. Any idea on how to disable this?


Original Post

Is there's a bounding box on an application that receives touch events? I created a few sample round rect buttons and placed them in different places in my view. The ones in the center of the view receive touch events (and show the highlighted blue color) but if I place a button near the edges of the view, only parts of them are clickable in the simulator. Is this because of Apples style guidelines? I placed a button exactly where a UITabNavigationItem would appear and only the bottom half of it is clickable.


Simulator has a bug with clickability of the former status bar area. Test on the real device.

0

精彩评论

暂无评论...
验证码 换一张
取 消