xcode4.2

Multiple views in Xcode storyboard view controller, one of them won't appear in storyboard editor

╄→尐↘猪︶ㄣ 提交于 2019-11-30 11:32:09
I'm having trouble updating a project someone else created in Xcode. This is an app built in storyboard and in one case, there is a scene with a view controller that has multiple views underneath it in the document outline palette of the storyboard editor (shown in included image). The first view is the one that becomes highlighted in the storyboard editor when it is clicked on, and as you change the design or the objects in the view that view is updated. There is a second view (the one beneath exit and first responder) that is somehow attached to that scene but I cannot figure out how to edit

Submitting a Mac App fails with 'Bad File Descriptor'

*爱你&永不变心* 提交于 2019-11-30 09:23:36
问题 I've managed to sign my app and have archived it in Xcode 4.2 but when I go to the organiser and press ether 'Validate' or 'Submit' (and after going through the two sheets for iTunes Connect login and application record and signing) I get an error "The operation couldn't be completed. Bad file descriptor". Restarting Xcode did not fix the problem. I've also tried the Application Loader app included in the developer tools but I can't figure out what kind of file it's looking for since it won't

How to differentiate multiple targets with Xcode 4.2

三世轮回 提交于 2019-11-30 09:04:35
I've developed a lite version of an app. Now I want to create a paid version. So I've duplicated the target, changed its name (so change plist and other stuff with that name) and now I have to differentiate in code. I'm using Xcode 4.2 and I see on the web that I have to create a preprocessor flag. My problem is that this flag in Xcode 4.2 is only in the project's build setting and not in the target's build setting. I will need to be able to do something like this: #ifdef paid ... #else ... #endif Use preprocessor macros to do this. Go to Target -> Build Setting and choose "All configurations"

Mapping a JSON response to an object using RestKit and Objective-C

我只是一个虾纸丫 提交于 2019-11-30 07:47:19
I am relatively new to Objective-C and am attempting to use RestKit to receive a JSON response from a web service. I have successfully received the data back to my application, which looks like this viewing the response: {id:"1","Translation":"Test"} I would like to map this translation to my "Translation" object in my application, but have tried a few different ways but am not sure how to achieve this. So my questions are: How can I map this response to my Translation object Am I doing this correctly, creating a method to complete this call outwit my view controller? My Translation Object

How to enable/ disable “Automatic Reference Counting”?

人盡茶涼 提交于 2019-11-30 07:02:59
问题 Using Xcode 4.2, how can one enable/disable "Automatic Reference Counting"? ANSWERED Under Build Settings, flip "yes" and "no" depending whether you want ARC enabled. 回答1: Globally: Go to "Build Settings", look for "Apple LLVM compiler 3.0 - Language". Set the field "Objective-C Automatic Reference Counting" to "No". For individual files: Go to "Build Phases", select the file, double-click the "Compiler Flags" column and put "-fno-objc-arc" in it. 回答2: To enable ARC per-file, you can also set

Facebook iOS SDK 3.1 with XCode 4.2 linker errors

孤街浪徒 提交于 2019-11-30 06:45:01
I've just updated the Facebook iOS SDK in my project from 3.0 to 3.1. The project does not compile anymore. Instead I get the following linker errors: Undefined symbols for architecture i386: "_ACFacebookAppIdKey", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) "_ACFacebookAudienceEveryone", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) "_ACFacebookAudienceFriends", referenced from: -[FBSession

Xcode 4.2 can't debug iOS 4.2.1 (8C148)

前提是你 提交于 2019-11-30 04:15:24
问题 I recently updated to Xcode 4.2. I also updated my new iPad 2 and iPod (latest generation) to iOS 5. I build my app and can debug them no problem. My older iPod running iOS 4.2.1 (8C148) doesn't run and doesn't give any errors. The top center panel says "Finished running MyApp on iPod One". (iPod One is the name of my first iPod touch) There is a flicker at the bottom of Xcode as if it almost went into the debugger and was about to show the bottom output panel but it doesn't. A break point in

Unable to change the Price tier in the In app Purchase

社会主义新天地 提交于 2019-11-30 04:10:01
I'm unable to change the price of an in-app purchase. I added initially for testing purposes, but now that I'm submitting the app, I'd like to change it. Unfortunately, it doesn't seem to accept the change. It is showing me the same price tier not the updated one.what should i do ? I had this problem too. Here's how I solved it. When you change the tier in iTunes Connect, it's not enough to then click 'done'. You need to set the schedule to 'Now' and 'None' (for start and end date) and then click the 'Add to schedule' button. Then save. Cheers, S I found this especially confusing as the "Add

Programmatically setting iphone simulator location

北城余情 提交于 2019-11-30 03:13:46
问题 I've just updated to XCode 4.2 and I see a cool feature that allows me to manually set the device location. Does anyone know of a way to accomplish the same thing programmatically? I'd like to set the location in some unit tests. 回答1: The following AppleScript will let you set the location of the iOS Simulator. It should be possible to integrate this kind of script into a unit test script, or have your script generate the equivalent AppleEvents. tell application "iOS Simulator" activate end

Programmatically set image and text on UIButton

蓝咒 提交于 2019-11-30 03:07:15
I need to create button programatically with an image for normal and highlighted state as well text. I cannot build it using Interface Builder, because I need to create buttons over a UIScrollView . Here is the code I have so far: - (void)loadView { CGRect fullScreenRect=[[UIScreen mainScreen] applicationFrame]; scrollView=[[UIScrollView alloc] initWithFrame:fullScreenRect]; scrollView.contentSize=CGSizeMake(320,960); UIImageView *tempImageView2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.jpeg"]]; UIImage * buttonImage = [UIImage imageNamed:@"contentlist_active.png"]; self