• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to copy class interface and implementation without connections to .xib file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to copy class interface and implementation without connections to .xib file


  • Subject: Re: How to copy class interface and implementation without connections to .xib file
  • From: Andy Lee <email@hidden>
  • Date: Sun, 01 Jul 2012 18:57:57 -0400

On Jul 1, 2012, at 4:54 PM, Richard Altenburg (Brainchild) wrote:
> Thanks for your thoughts, Charles.
>
> No, I did not copy the .xib to a new project.
>
> I created a new project for iOS wit one view, and created a new class in it that is to be a subclass of UIView which will contain my drawing code in drawRect. I copied code from the old project over into the new project, into the .h and .m files of the new class. It immediately showed that the outlets and actions were connected, and on inspection they were connected to the .xib in the old project. I connected them to my new .xib in my new project, but how on earth are old ones copied over to a new project is beyond me at this moment.

At least once I've started a new project and within the new window a file was open that belonged to a previously opened project. I wonder if this is what happened to you, and the xib file you were looking at was not the xib file in your new project.

If you Command-click the file icon in the window's title bar, you can see the full path of the file you are looking at. If the path goes to the old project, close it with File > Close "YourFileName.xib". The keyboard equivalent is Control-Command-W. You might even want to close *all* files that are open in that window by holding down that key until the window says "No Editor". Closing the project window and reopening might help -- I didn't think to try that.

Then click on the xib as listed on the left, in the file navigator pane. *That* xib, the correct one, shouldn't have any mysterious connections. The only connected outlets should be any that are automatically created when you create certain kinds of nib, e.g., from a window controller to a window.

--Andy

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to copy class interface and implementation without connections to .xib file
      • From: "Richard Altenburg (Brainchild)" <email@hidden>
References: 
 >How to copy class interface and implementation without connections to .xib file (From: "Richard Altenburg (Brainchild)" <email@hidden>)
 >Re: How to copy class interface and implementation without connections to .xib file (From: Charles Srstka <email@hidden>)
 >Re: How to copy class interface and implementation without connections to .xib file (From: "Richard Altenburg (Brainchild)" <email@hidden>)

  • Prev by Date: Re: How to copy class interface and implementation without connections to .xib file
  • Next by Date: opening file without an extension
  • Previous by thread: Re: How to copy class interface and implementation without connections to .xib file
  • Next by thread: Re: How to copy class interface and implementation without connections to .xib file
  • Index(es):
    • Date
    • Thread