In xCode, I get the error "The tip was loaded, but the exit point has not been set"?

I know that there are several questions asking the same thing, but none of their solutions worked for me.

I made my own class viewController (Home), and I made .xib separately. (In fact, I will have 2 tips - one for loading the ipad and one for the iphone).

When I try to instantiate a home class, I got the error that I mentioned in the question.

In the xib file, all I did was drag the viewcontroller object from the library onto the screen, and it automatically added a viewcontroller icon below the file owner and the first responder. Then I went into the inspector of the viewController object and changed the class from viewController to Home.

The next step that I determined from the solutions is to connect the output for viewing from the inspector. I'm not quite sure what I should connect to. The solutions I found say to connect it to the view icon, but again, all I see is the owner of the file, the first responder and the vc object. He does not connect with any of them.

Here is what I added to the application delegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { Home *homePage = [[Home alloc] initWithNibName:@"HomeIpad" bundle:nil]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:homePage]; [self.window addSubview:navController.view]; [self.window makeKeyAndVisible]; return YES; } 
+1
objective-c interface-builder nib
Aug 18 '11 at 6:11
source share
3 answers

the problem was that for the file owner I did not set the class Home

+1
Aug 19 2018-11-22T00:
source share

I suggest you create a Nib using Xcode File-> New-> New File → Cocoa Touch-> UIViewController subclass-> with XIB for the user interface (do it twice, once when Targeted for iPad is checked), I believe that this The most reliable way to create and connect XIB.

Even if you want to use two XIBs for the same controller, create a second VC subclass using any temporary name (e.g. tempvc). Now rename tempvc.xib to HomeIpad.xib. Right-click on HomeIpad.xib and select Open As-> Source Code. In the source, find tempvc and replace it with the name of your controller for all occurrences. Everything should be fine now.

+2
Aug 18 '11 at 8:12
source share

You do not need to drag the view controller. Just drag and drop the UIView and attach the file owner view to this UIView.

0
Aug 18 2018-11-11T00:
source share



All Articles