xcode4

Strange behavior of Xcode Build Products Path under Build Locations

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 13:13:56
问题 I've been looking for an answer but I couldn't find so I'm posting the question here. Every Project I created under Xcode4 gets the exactly the same "Build Products Path" under the project or target settings - Build Locations I wonder if this is because I did something back in Xcode 3 and somehow permanently set the value ? I have uninstall completely and re-install from scratch and still the same thing. I just created 3 brand new ios projects (windows based) under the xcode4 and those all

How to get started with unit testing in Xcode 4?

偶尔善良 提交于 2019-12-13 12:06:23
问题 Does anyone know how to get started with unit testing in Xcode 4? How do I create a test and how do I run it? EDIT: All the Apple documentation is for Xcode 3 回答1: See this question: Unit testing in XCode 4 Basically, it says to use GHUnit and ignore SenTestingKit for now (bceause it's broken). GHUnit is pretty nifty. 回答2: Although most of the documentation is in fact for XCode 3, the XCode4 User Guide: Building and Running Your Code gives clear step-by-step instructions. Essentially, you

Property List Editor after installing Xcode 4

为君一笑 提交于 2019-12-13 12:04:38
问题 I cannot find where it is after I installing Xcode 4. Does any one know where it is ? Edit: I had installed another app for editing XML file. It is named XMLEditor and located here. Because I need to edit a plist file with an extension which is not end with .plist , so finally I googled another solutions about XML editor. 回答1: In XCode 4 the property list editor is integrated. It should appear in the XCode application. 回答2: I put together a frankenstien version of the Property List Editor a

Submitting iPhone App To App Store, Proper provision profile

青春壹個敷衍的年華 提交于 2019-12-13 08:47:01
问题 We are in the process of submitting an iphone app to the app store. We've tested it using an adhoc distribution provisioning profile, however I was wondering if I need to create a separate provisioning profile for the app store. On the distribution tab in the provisioning area, it enables me to create a distribution provision profile for the app store. Do I need to build the app with that in order to submit it? 回答1: Yes, the adhoc will not work, you need to rebuild / archive with the profile

Partially displaying the Title in the tableView Cell?

耗尽温柔 提交于 2019-12-13 08:43:39
问题 I'm tried to display the Title Data in the Tableview Cell it displayed but partially (...) i want to display full title in the table cell may be in two or three line i used customize cell and use the label and set label property but still data displayed partially titleLabel.text = aNewsInfo.title; Can any one suggest me the way to overcome this prob... Thanks in Advance... 回答1: Try this code: myLabel.lineBreakMode = UILineBreakModeWordWrap; myLabel.numberOfLines = 2; // 2 lines ; 0 -

Xcode 4.2 Build on iPod touch 1st gen

安稳与你 提交于 2019-12-13 08:28:31
问题 I'm having problems building my app on 1st generation iPod touch. I've changed the Architecture value to "armv6 armv7" and also the deployment target to 3.0 iPod touch is running iOS 3.1.3 Anyone has a solution for that? Thanks 回答1: If this is a new Xcode project, Xcode adds a required device element of armv7 in the info.plist for the target. It needs to be removed. Also be sure your not using ARC or storyboarding when creating your projects. 来源: https://stackoverflow.com/questions/8491996

Xcode looking in wrong folder

社会主义新天地 提交于 2019-12-13 08:13:26
问题 Xcode 4.2 is looking in my tags folder when I build. This is causing duplicate interface errors, since it believe I have defined classes twice. My folder structure is: tags trunk My current build is in trunk and Xcode is also looking in tags. How can I make it stop doing that? 回答1: After editing the pbxproj file, I found references into the other folder. I then removed those files via Xcode and added them back from the correct location. Problem solved. 来源: https://stackoverflow.com/questions

Filtering a CoreData FetchRequest

守給你的承諾、 提交于 2019-12-13 07:16:42
问题 I am having a brain meltdown trying to filter a fetchRequest. I'm able to get the full details of every record of the entity, but I only want the details on the record at the current indexPath. This is where my code is at present: -(void) fetchStuff { NSLog(@"%s", __FUNCTION__); NSError *error = nil; NSManagedObjectContext *context = [self managedObjectContext]; NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *woodgie = [NSEntityDescription entityForName:@

JSON for Objective-C returns error “Illegal start of token [r]”

寵の児 提交于 2019-12-13 06:56:48
问题 I am attempting to connect to a web page and return a JSON string. This string simply needs to be parsed in JSON and returned into an NSArray that I have waiting for it. The problem is that JSON doesn't always return the results. Sometimes, it works well. Sometimes, it returns (null), citing the error below. self.accounts = nil; // Clear the NSArray NSString *post = [NSString stringWithFormat:@"username=%@", username.text]; NSData *postData = [NSData dataWithBytes: [post UTF8String] length:

make invisible a UIBarButtonItem

泪湿孤枕 提交于 2019-12-13 05:56:39
问题 I can make an invisible UIBarButtonItem on UIToolbar, inserted with XCode / Storyboard? I have found a property to disable it: enabled = NO, but is not made it invisible 回答1: NSMutableArray *items = [YourToolBar.items mutableCopy]; [items removeObject:BarButton]; YourToolBar.items = items; [items release]; 来源: https://stackoverflow.com/questions/10753233/make-invisible-a-uibarbuttonitem