xcode4

XIB File opens like an XML in XCode but opens correctly with Interface Builder

ぃ、小莉子 提交于 2019-12-04 08:49:35
问题 When I double-click my file StartWindow.xib in Xcode 4, it does not open into the integrated Interface Builder; it opens like a XML file. I can open all other xib files and they display as expected. I can open it with the old Interface Builder via "Open with". What can I do to open it with the integrated Interface Builder? 回答1: Go to the File Inspector after selecting the nib file. Under Identity and Type , select the drop down list for File Type and choose the topmost element Default - com

Making universal apps without Interface Builder

旧城冷巷雨未停 提交于 2019-12-04 08:45:11
问题 I'm using XCode 4.2, with iOS 5, and would like to make a universal app, not using Interface Builder, as outlined in this post, not using a MainWindow.xib. I would also like to separate my iPhone and iPad code, using the technique outlined in Kotan Code's post. So I have the main appdelegate , and appdelegate_iPhone and an appdelegate_iPad that inherit from it. Back in XCode 4.0 (and in Kotan's post), the appropriate appdelegate was used because there was a MainWindow_iPhone.xib (or

How to localize Settings.bundle in xcode4?

↘锁芯ラ 提交于 2019-12-04 08:16:49
问题 I am working on xcode4 and created a Settings.bundle for my project. I can edit the Root.plist file in xcode4 but it is not possible to edit the Root.strings file. It isn't even displayed in the editor. I can not expand the en.lproj folder as you see in the picture. But when I do right-click, open in external editor it gives me: Double click on Root.strings gives me: I tried it several times, creating a new window-based application project and creating a new Settings.bundle. I always can not

.h and .m files for view controllers added within storyboard xcode 4

女生的网名这么多〃 提交于 2019-12-04 08:02:58
问题 I've created the flow of my application with storyboard. It's a navigation based storyboard layout with a few stacks of views. Where can I create .h and .m files to actually make the app DO things? The general navigational flow of the app is just fine as a result of story board, but I need to add my own code to the views. Thanks! 回答1: Go to File->New->New File and create a UIViewSubclass without the xib/nib for each view that you have. This will create the .h and .m files. Then, select the

Can I use “Automatic Lightweight Migration” if my already release v1 didn't have a versioned Core Data model?

心不动则不痛 提交于 2019-12-04 07:58:32
Can I use "Automatic Lightweight Migration" if my already release v1 didn't have a versioned Core Data model? If yes, are there any key changed to the documented steps I need to apply? Not only can you do this, in one sense it is the only way you can do this. From the Apple Documentation , "To create a versioned model, you start with a normal model..." Your v1 had a normal model. As long as you have that model, and you follow the steps linked in that tutorial to create a versioned model, lightweight migration will work—if your migration meets the usual lightweight migration requirements. The

Integrate mogenerator within Xcode 4

你。 提交于 2019-12-04 07:56:03
In my application I'm using Core Data stuff to enable persistent data saving. Since I've seen that mogenerator provides a good approach to create and maintain NSManagedObject subclasses (also with additional functionalities), I'm looking for some tips for integrating monogenerator within Xcode 4? P.S. The question has been submitted based on share your knowledge, Q&A-style . For Xcode 4.5+, the easiest way is to setup a "Pre-action" in your scheme: Edit the scheme you want to build Open the "Build" item and select "Pre-actions" Click on the "+" and add a "New Run Script Action" In the "Provide

Renaming targets in Xcode 4

我们两清 提交于 2019-12-04 07:35:27
问题 In Xcode 4 I changed the name of my cocoa Application's Target Name because I wanted to change the name of the executable. The Build works fine but after compiling Xcode still starts the old executable that is still listed in the Products folder in the project navigator. How can I change which application Xcode 4 starts up after build? 回答1: To change the name of the application, you can select the new target, click the Build Settings tab, look for the Packaging section and change the Product

Xcode 4 Tips and Tricks for Xcode 3 users [closed]

匆匆过客 提交于 2019-12-04 07:23:11
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . As most of you have probably seen, Xcode 4 has been released officially today. Now I know that plenty of devs out there have been

Hidden Features of Xcode 4

橙三吉。 提交于 2019-12-04 07:17:23
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Now that Xcode 4 is officially released it's time for a follow up to my previous question: Hidden Features of Xcode So what are they? What are those hidden little Xcode 4 hints & tips that you can't live without? Please limit your tips to those that are new and specific to Xcode 4! 回答1: If you like your code to look as

GHUnit Linker Error with App Classes

孤人 提交于 2019-12-04 06:59:12
I'm trying to run a GHUnit test to just test that a setter actually works for a NSManagedObject object in my app. My app is called Machine and my GHUnit target is called Tests. I've added Machine as a dependency to the Tests target. My object in the test is called Goal. Here is the code and the error in the Link is shown below. #import <GHUnitIOS/GHUnit.h> #import <CoreData/CoreData.h> #import "Goal.h" #import "GoalRec.h" @interface ControllerTests : GHTestCase { } @property (retain) Goal *goal; @end @implementation ControllerTests @synthesize goal; - (BOOL)shouldRunOnMainThread { // By