I have a simple application. It is you touch start button, then the display will change, then you shake your iPhone, it shows you some texts. The problem I am having now is first time the app was developed for iOS 3.0. Since then the codes weren't touched. Last week I upgraded my Xcode into version 4.2. Then my app is controlling itself no touches required. It will control itself. When I modified the touchesbegan function, it doesn't change. Neither the accelerometer does. So what could be the problem?
Related
I want to develop one iOS app. Is there any way to get the ui touch point when app in background. Like i want tap randomly in iOS device screen and my app will get correspond touch point accordingly.
Fortunately, this is not possible on iOS.
I am having an issue with QLPreviewController on XCode 4.2 iOS SDK 5.0. I run my code on iPod Touch running iOS 4.3.3. Basically my app uses QLPreviewController to preview PDF files in Documents directory and if the app resigns active, the next time it becomes active it will require a user to enter 4-digit PIN number. The app runs fine in general, previewing PDF files with no problem at all. The problem I'm facing is that QLPreviewController shows a blank screen after the app returns from background (and of course after a correct PIN has been entered).
I have the screenshots below. The one before going to background is http://www.mediafire.com/i/?vxdmrx5mjxrwglp
and the one after returning from background is http://www.mediafire.com/i/?jhdmavzvccj0f2q
Please note that the source PDF file is not modified at all, and I did call both refreshCurrentPreviewItem and reloadData methods in viewDidAppear.
Similar problems on iPhone Simulator running 4.3.2. However, this problem does not occur on iOS 5.
Does anyone ever experience this issue? Any comments or workaround would be much appreciated.
Thanks
PS. It is strange that when the application goes to background, the delegate previewControllerDidDismiss: is fired on iOS 4. On iOS 5, this does not happen. Perhaps this is the reason of the blank screen. Any thought? Any workaround?
I had an issue on iOS 5.1 where the custom button I had on the Quicklook toolbar disappeared when coming back from the background. I fixed it by using an NSNotifcation for when the app became active again and the Quicklook controller listened for it and re-updated the navigation button.
I assume something similar could be done with reloading the document.
I was facing issues in ipod touch devices when build with ios 5. It actually messes up the entire screen and all the textbox, labels, buttons displayed in the bottom of the screen and after scrolling up and down, everything gets aligned properly.
I have same issue in iphone, i just did the following setting and it did worked with same ios sdk (armv6armv7, with no optimization level none).
Have you guys faced similar issues ? iPod touch 2nd generation is the only problem now. Do you have any suggestions for fixing this up ?
or is this a ios problem ?
I had the same problem and I did the same changes as you to solve it. Just make sure you also change it for Distribution and Release too (I made that mistake).
As for the iPod touch 2G - that doesn't support iOS 5. Are you looking specifically about supporting iOS 5 on an iPod touch 2G? If so, according to Apple, you don't have to.
I am developing an app for iPhone.
I am looking for a way to run some code once a drag gesture is recognized on the homescreen (or on all screens if possible).
Does anyone know how to get this with the iOS SDK using Xcode and Objective-C?
Your app cannot receive gestures anywhere in iOS except within itself and its own views while it's active (not counting system notifications and the app icon).
I doubt this is possible. To do this, you will need to hook into the OS at a lower level than is usually allowed.
iOS is locked down much more than Mac OS, I'm afraid.
I'm trying to get the following functionality in my iPhone app:
When backgrounded, stays running (doesn't have to do any background work)
When resumed, app picks up where it was left off
I'm mainly wanting the same screen on my app still up, as there are several UINavigationControllers within a UITabBarController.
I have done all of the following:
Made sure I'm compiling with 4.1 SDK
Set UIApplicationExitsOnSuspend to false
Handle DidEnterBackground and WillEnterForeground in my AppDelegate
Call BeginBackgroundTask in DidEnterBackground, to attempt to keep my app open
I'm using MonoTouch, but that it probably beside the point. I can take answers in Obj-C, for sure.
I've tested my app on a jailbroken phone with Backgrounder, and I see the "app in background" badge disappear immediately after pushing the home button. I also tried setting UIBackgroundModes in my Info.plist, but to no avail.
Is there anything I'm missing?
Or is this something I would have to implement on my own to resume the previous state of my app? Everywhere I've read talks like it should just work automatically.
If you don't want to be doing work in background, don't call beginBackgroundTask. That call is for situations where you want to do some kind of work in the background. And if you don't finish that work fast enough, iOS will terminate your app.
When I upgraded to iOS 4.x, my MT application started exhibiting this behavior without me having to do anything. iOS should take care of it for you.
I finally got in touch with someone on MonoTouch's irc.
In MonoDevelop there is an option to make a dual iPad/iPhone project, which I used. This is causing my app to behave as if it's running with the 3.2 SDK when deployed to the device.
I think my solution is to install the iOS 4.2 SDK that just came out, since this ads the new multi-tasking feature on iPad.
Not only do you need to support going into the background, you also need to support cases where your app has been terminated. In your app’s initialization code, you should resume the state that it was in. For instance, when you push a view controller, use NSUserDefaults to store a value for the currently-displayed screen, and then when you start read that value and display the associated screen.