Im going to be using a framework that allows a iphone app to control my app on iPad. When i add it im going to make the joystick move a image of a mouse, and when the user presses the A button, i want to make the device think the user is touching at that point. Is there any way to do this?
Example: I place a button on the ipad screen at 0,0 with height and width of 100. then mouse is at point 50,50 and when the user presses and holds A, that button is held down, and when user lifts up, it calls that buttons action.
Related
I'm finding a way to set a background image when half of app screen slides down. for the behaviour double tap the home button. Can anybody give me some help for this?
That area is not part of the application, but rather a view placed by the operating system.
Think of the double tap as a mechanism for the OS to "shift" your app down for easier access.
I have an iPad app that presents a UITextField inside a UIPopover when a button is tapped. This button is near the bottom of the screen. So, the user taps the button, the popover appears and becomes the first responder, which causes the keyboard to appear. This, in turn, causes the popover to move up as the keyboard slides in. This works fine, except for VoiceOver.
It appears that VoiceOver gets confused by the moving view. It starts to describe the new text field, but then stops mid-word as soon as it starts to move.
Does anyone know of a good work-around. The best I've come up with so far is to listen for UIKeyboardDidShowNotification and then find some way to kick VoiceOver to talk again, though I'm not sure how to kick VoiceOver into action.
You can inform VoiceOver of changes to your screen layout by using the accessibility notifications - UIAccessibilityLayoutChangedNotification or UIAcessibilityScreenChangedNotification would be good candidates.
I am working on an app for iPad. In one class, I have used a scroll view at the bottom of the screen. This scroll view has some buttons. Those button play a video or open a PDF file. When user frequently taps on those button the app crashes. I have no idea why is it happening. Can any one please tell me why is it happening and how can I fix this crash?
Regards
PC
You should track the state of your view. Which button was pressed last, and don't allow it to be pressed again until.
a) it is done loading the pdf/video
and/or
b) another button has been pressed
You might have to be more strict than that, but we cannot help more than that at this point as Till mentions in your comments
I'm developing a kiosk mode application for OSX. In some circumstances, another screen gets attached. My application runs in fullscreen on one screen using:
[self.window.contentView enterFullScreenMode:s
withOptions:[NSDictionary dictionaryWithObject:appOptions
forKey:NSFullScreenModeApplicationPresentationOptions]];
The options are the following:
[NSNumber numberWithUnsignedInt:(NSApplicationPresentationHideMenuBar|
NSApplicationPresentationHideDock|
NSApplicationPresentationDisableHideApplication|
NSApplicationPresentationDisableProcessSwitching|
NSApplicationPresentationDisableAppleMenu)];
What I want is limit the mouse cursor to the screen where the game is running.
How can I accomplish that?
Add an NSTrackingArea to the screens you don't want the mouse entering. When you get notified that the mouse has entered the tracking area, use CGEventCreateMouseEvent and CGPostEvent to move the mouse back to a safe location, probably the nearest point on the main screen.
In an application that I'm writing I have a UIWebview up top and some UITextFields at the bottom that I want the user to be able to type in depending on what's in the webview. But when they touch the Text Field and the keyboard pops up, the user loses the ability to manipulate the web page to see different parts.
Is there a way to keep the keyboard up and still be able to manipulate the UIWebView?
No I believe the Keyboard is modal so you can't access the form underneath it.
You can respond to the
- (void)keyboardWillShow:(NSNotification*)aNotification;
- (void)keyboardWillHidde:(NSNotification*)aNotification;
notifications and scroll the View up or down when the keyboard is shown...
Example here