I have a UIToolbar at the bottom of the view. when I run the application using iPhone Simulator 2.2.1, the toolbar is displayed in place. But when I run the application using iPhone Simulator 3.0 the toolbar is shifted up from its place. Is there any way I can fix this ? I would appreciate any help.
Thanks,
Sarah
Using toolbars in iPhone OS 2.x is hard to get it right. The documentation is fuzzy, or non-existing. The addition of proper toolbar handling in iPhone OS 3.0 is a clear sign of Apple admitting that toolbars in 2.x where just not ready for the public.
This is not the answer you expect, but the answer you need. Ask yourself; "Will a user who has not bothered to update to iPhone OS 3.0 bother to install my app?"
The answer is most probably no.
Then what you should do is make sure your application uses a UINavigationController, and have each UIViewController that needs a toolbar set it's toolbarItems property to an NSArray with the UIBarButtonItem objects you need.
On iPhone OS 3.0 this will result in a toolbar that is automatically populated, laid out, and managed for you with no fuzz.
What does it look like on the device?
I've had wonky issues with the 2.2.1 simulator since updating to the 3.0 SDK, and from what I've found on Google, I'm not the only one. If it looks fine on the device, then ignore the simulator issues, or debug with the 3.0 simulator instead.
Related
i can run my app on my 6.1 iOS but can't with 5.1
i have the iOS Deployment Target set to 5.1 on both Project and Target
when i run the simulation for 5.1 it works fine but when i try it on my iPhone it crash's
i committed out all my code thinking that was the problem but the same thing keeps happening
XIB and auto-layout is not enabled
The iPhone simulation works with no errors
I tried to create a new project and have only a label and i still get the same out come
can some one send a link to a single view project that works with 5.1, the program could be blank i just want to compare to mine to see what is different/ wrong.
Sounds like you might be trying to use an API that is specific to iOS6 (UICollectionView or something similar).
You need to plug the device in and run it and see what the console indicates is the problem.
You have Auto Layout turned on for ViewController.xib. There are two ways to work around this. Either disable Auto Layout on that xib:
1) Xcode 4.3 not presenting Autoresizing panel in Size Inspector
Or use one of many methods to enable auto layout while remaining backwards compatible:
2) Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5
Have an odd thing happening with an app I'm on.
Firstly, the code and particular action within the app is fine when running on the iOS 5.1 simulator. When I run the same app on iOS 6.0 simulator, the action doesn't work.
Building the code on 5.1 sim produces an error free build. Building on 6.0 produces yellow warnings only.
I kind of expected this after some things being deprecated after the SDK upgrade.
The yellow warnings I have are of a deprecation but only that a Group Table View Background Color is now not available in 6.0 so I don't think that's affecting it.
Before posting code that works in 5.1, I'll explain.
I can fill, enter and save some text in a plain old text box. I then use that saved text to populate a picker in another tab.
As I say, works great with no problems in 5.1, seems not to work in 6.0.
Has anyone experienced similar things populating their pickers from 5.1 to 6.0?
Is their anything common that you guys know about before I delve deeper?
Many thanks for reading,
Gaz.
please make sure the you have copied the yourDataBase.sqlite from iOS5 simulator to your application bundle in iOS6 simulator.
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.
Using the latest SDK from Apple, I noticed that while running on the iPhone works fine, the iPad version of my application doesn't "accept clicks" on any view/widget that is outside the "bounds" of the standard iPhone screen.
Any idea?
Thanks,
Reuven
Vanilla iPhone apps will only accept touches within that little bounds, to reproduce that fact that the iPhone resolution is only 320×480.
To fix it, upgrade your app for iPad.
(Also, make sure you don't hard-code any numbers. For example, use [UIScreen mainScreen].bounds.)
OK - found it...
All I needed to do was to open MainWindow.xib in Interface Bulder, and in the Window Attributeds palette, to check "Full Screen at Launch".
I know it's possible to create a dynamically changable Default.png by creating a symbolic link. But that's not possible in iPhone SDK 3.0 anymore (only in 2.0).
How can I make this in 3.0, or is this impossible?
Tim
This worked on iPhone OS 2.0 http://collison.ie/blog/2008/11/dynamic-defaultpng-files-on-the-iphone but not on iPhone OS 3.0 anymore. The default-screen is always black.
I can change the default-screen in the documents-folder and the symbolic-link does link to that file. I tested that by browsing to the app-folder from the Simulator. I saw the right file in the documents-directory and I saw that the symbolic link points to that (the right) file.
It's not possible in 3.0. It was only possible on 2.0 because it was an exploitable bug. The bug was fixed in 3.0 which is why it's not possible.
Apple don't intend the Default.png to be a "splash screen".
If you read the HIG, you'll see that the Default.png is suppose to represent your user interface as it would be "empty" - without any content. It is intended to give the user the illusion of an "near instant" launch.
Check out all of the Apple apps on the iPhone and you'll see how the default.png is meant to be used properly.
Apple frown upon using the Default.png as a splash screen. They say that it is really only appropriate for apps such as games that don't use the standard UI elements that are provided in the SDK.
That being said - lots of apps these days are using this feature to show splash screens, and seems Apple aren't really enforcing this guideline.
Long story short, you can do a splash screen, but it can't be dynamic - not anymore.
Use a blank Default.png and then in your app delegate's -applicationDidFinishLaunching: method, load a UIView that contains your dynamic content. This solution sidesteps any conflicts with Apple's SDK terms as well as all technical problems.