How can I set background image when half of app screen slides down for the behavior double tap the home button? - objective-c

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.

Related

Objective-c call touch on screen without user touching the screen

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.

Swipe without actually swiping in iPad?

Is it possible to make a view move either to the left or right in the iPad, when I tap on a button, instead of actually swiping on the view.
This can be seen in the iPad when I'm in the screen after the search screen, and I install an app, the screens move to the left by itself and the app sits in the right place and starts installing.
Any suggestion will help.
The home screen is actually a UIScrollView with paging enabled. So it just moves to the next page (with scrollRectToVisible) if a new app is installed. So if you want to have something like that, I guess you have to implement a paging UIScrollView. Just search for that and you will find a lot of good tutorials.
Some further resources:
UIScrollView reference documentation
A paging UIScrollView tutorial

App crashes when tapped frequently

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

Cocoa: Limit mouse to screen

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.

Making a full screen Cocoa app

I want to create a full Screen Cocoa application, however my app is slightly different from a conventional fullscreen app.
This app would be below everything else, so underneath the menu bar and the Dock, etc. It would have a large image covering up the Desktop and icons, with a custom NSView in the middle with a table view, etc. If this concept is hard to understand then here is an image:
http://img10.imageshack.us/img10/6308/mockupo.png
The only part that might be a bit confusing is the background image. This background image is NOT the wallpaper of the computer, but part of the app. So when the app is launched, it goes into full screen mode and puts itself underneath the dock and the menu bar, and underneath all other windows too. So it draws the background image to cover the screen (including Desktop and icons). Then has a custom NSView in the middle containing my controls.
What's the best way to go about doing this?
Thanks
Make a borderless window, the size of the menu-bar screen (screen 0—not [NSScreen mainScreen]), positioned at 0,0, with window level kCGDesktopWindowLevel.
Remember that you will need to observe for screen frame-change notifications (when the user changes the screen dimensions), and that you should correctly handle the case of no screen at all (headless Mac).
I think #Peter Hosey’s solution should work, but to make other windows go on top, you will probably need to change the window level to something else.
But, I implore you, do not do this. This will be the most bugly application the Macintosh has ever seen. There are a lot of really good user interface paradigms that you can use, and "replicating" the main desktop interface of Mac OS X is generally not one of them. That is, unless you are reimplementing Time Machine or something like that.