I downloaded Xcode 4.2 recently and created a new project. I've built stuff using previous versions of Xcode without too much difficulty, but I'm completely lost and need a little guidance.
I want a little app that has a single view, with a couple of buttons and labels and regular old UI stuff. I knew how to put this together until Xcode 4.2.
First, I didn't recognize any of the templates. Is there a good template for a TableView app?
Finally, this project, straight out of the box, doesn't actually run! Here's what I get:
That points back to this code, in main.m:
specifically, that return line.
So here I am, completely unable to even get started. Please help, at least to get me past this part.
I want a little app that has a single view, with a couple of buttons and labels and regular old UI stuff. I knew how to put this together until Xcode 4.2.
First, I didn't recognize any of the templates. Is there a good template for a TableView app?
Because I didn't recognize any of the templates, I chose the "Single View Application" template.
Second, WTF is a Storyboard and why would I want to use that? I want my .xibs, dammit.
I managed to convince it to create a .xib by unchecking the storyboard box. I also turned off ARC, because I don't understand that either.
Finally, this project, straight out of the box, doesn't actually run! Here's what I get:
Code:
2011-11-03 18:42:09.998 eMoocher[15560:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x4b1a9f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00fb8be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0110d5c2 objc_exception_throw + 47
2 CoreFoundation 0x00fb8b21 -[NSException raise] + 17
3 Foundation 0x007796cf _NSSetUsingKeyValueSetter + 135
4 Foundation 0x0077963d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x002098d6 -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00f2f2cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x002082ed -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x0020a081 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x00014943 -[UIApplication _loadMainNibFile] + 172
10 UIKit 0x000154ca -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
11 UIKit 0x0001fdb2 -[UIApplication handleEvent:withNewEvent:] + 1533
12 UIKit 0x00018202 -[UIApplication sendEvent:] + 71
13 UIKit 0x0001d732 _UIApplicationHandleEvent + 7576
14 GraphicsServices 0x00cbca36 PurpleEventCallback + 1550
15 CoreFoundation 0x00f9a064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x00efa6f7 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x00ef7983 __CFRunLoopRun + 979
18 CoreFoundation 0x00ef7240 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00ef7161 CFRunLoopRunInMode + 97
20 UIKit 0x00014fa8 -[UIApplication _run] + 636
21 UIKit 0x0002142e UIApplicationMain + 1160
22 eMoocher 0x00001d7d main + 125
23 eMoocher 0x00001cf5 start + 53
)
That points back to this code, in main.m:
Code:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([EMAppDelegate class]));
}
}
specifically, that return line.
So here I am, completely unable to even get started. Please help, at least to get me past this part.
Last edited: