Unknown class [A Collection View Controller] in Interface Builder file - ios5

I wish to run iOS 6 programs on my iOS 5.1.1 iPad 1st generation, and all the UICollectionViews are all disappeared and debug console says
Unknown class collectionViewController in Interface Builder file
Is it because of incompatibility with UICollectionViews in iOS 5?

Correct. According to the documentation for the UICollectionView class, its availability is marked as "Available in iOS 6.0 and later." which means it does not exist in iOS 5.

Related

Outlet works on simulator, but crashes on device

I have a very simple view with a button and a label. In XCode's Interface Builder I ctrl-dragged to get a reference to the UIButton and called it btnPlay. In my view controller I have this code:
public override void ViewDidLoad()
{
base.ViewDidLoad();
// On my phone this line causes a crash:
Console.WriteLine("Button title: {0}", btnPlay.CurrentTitle);
}
When I run the app in the iPhone Simulator (3.5" Retina / iOS 7.0) all is well. Inspecting btnPlay at a breakpoint shows it as a MonoTouch.UIKit.UIButton object.
When I run the app on my iPhone 5C (iOS 7) btnPlay shows up as a MonoTouch.UIKit.UIView object which has no CurrentTitle property and so crashes the app.
What can be the cause of this?
More info:
A stack trace from the device log crash
report
My setup: Xamarin Studio V 4.2.2 (build 2) * Mono 3.2.5 * Xcode 5.0.2 (3335.32) * Xamarin.iOS Version: 7.0.4.209 (Indie Edition) * Build date: 2013-11-11 16:04:00-0500
In my view's .designer.cs class the property is of type MonoTouch.UIKit.UIButton
In the .xib file it is a <button>
Deleting the app from the phone and running a clean build doesn't solve the issue
I can't reproduce the behaviour in a simple app with just one view and one button, so I'm asking for clues where to start looking for the problem

how to add and edit 2 views in one view controller in xcode 4.2 from Interface Builder in iphone?

I am Abbas,I am new to iPhone Development,
Till tomorrow i am using xcode 3.2 sdk and build in interface builder,
I have updated my xcode to 4.2,
If i am adding another view to existing view controller by assigning IBOutlet View *view1,
and edit my new view from Interface Builder, it does not able to edit.
and also my previous Interface builder is not showing.
What i can do, Give me any suggestion,
Please Help me.
Thanks.
From xcode4, interface builder is integrated into xcode, it isn't a single UI any more.
You can easily edit it through just single click the .xib file. Maybe there is some wrong operation. I recommend you to close xcode3.2 and the project , then reopen the project only in xcode 4.2 .

How to set Interface Builder document versioning default to 4.2?

When I create a new xib in interface builder the Interface Builder Document (Versioning) development parameter is defaulting to xCode 4.1
Is there anyway to default this to xCode 4.2 - The reason I ask is I recently changed a project to use IOS 5 and 4.2 - The project was originally created in 4.1, and when I create a new xib and set the size of the view to "Form Sheet" it generates a waring:
Attribute Unavailable: Form Sheet simulated metrics are not available prior to Xcode 4.2.
I can fix the warning by changing the Document Version drop down in the property inspector to 4.2
You will have to modify directly the XCode templates :
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File Templates/User Interface - Contains templates when you choose the menu File->New...->New File...
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/User Interface - Contains templates when you choose the menu File->New...->New Project...
Edit the any xib you want by adding this inside <archive><data>:
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<real value="4200" key="NS.object.0"/>
</object>

Displaying XIB on UIView!How can i set it?

How can i display a XIB interface on an UIView!Please be simple!
a UIView interface built in a XIB can be displayed by linking that XIB with a UIViewController.
Check out the Apple documentation About Windows and Views.
And you can see how a XIB is set up just by creating a new project in XCode and choosing "Single View Application" as a template. If you're using XCode 4.2, the "MainStoryboard.storyboard" file appears to be the new name for a XIB file.
Which reminds me I should go check out the WWDC session online that talks about this -- and you should too. If you're a registered developer, it's free to check out! My educated guess is that the "Designing User Interfaces for iOS and Mac OS X Apps" session (at https://developer.apple.com/videos/wwdc/2011/?id=110) is the one you want to see.

NSInternalInconsistencyException Could not load nib ind bundle

I am developing an application for the iPad. The application has following details:
Base SDK: 4.2
Deployment Target: 3.2
The application is a game application and it has got 10 rounds.
In each round I am loading 6 controllers and after the completion of each round again the same cycle starts.
The application works fine till 4 rounds but at the end of 4th round it crashes given following error:
"NSInternalInconsistencyException Could not load nib ind bundle:"
I have checked for everything solution like checking the nib file name, checking the nib file path. Nib file name and nib file path both are correct and targets are also correct but still it crashes.
Any help for this will be appreciated.
Thanks,
Shyam
Right click your nib file in xcode and make sure its type is 'file.xib'.
I had this problem too, in my case the cause was that my project had no localization to italian but the app was running under "it" settings.
The simulator has English as regional setting by default, everything was ok on it while the actual device had italian settings, so the app crashes immediately when attempting to load the RootViewController, because it was looking for an italian version of it.
In XCode I added an italian localized version to the RootViewController (now I see two entries under it, one for english created by default and italian). Note that you don't need to do the real translations in the view, it's enough that you create it and leave as default. Xcode copies all labels and text from the original view, you just leave as is for the moment.
You'll have to do this for each view controller in your project. Refer to Apple docs, for explanations on internationalization and localization here.
As a workaround, some people might prefer to change the device regional settings to English while performing tests...