xcode4.2

Do I need ARC keywords for properties that I don't synthesize?

耗尽温柔 提交于 2020-01-01 05:38:07
问题 I have a property that I do not synthesize, instead I create a getter and setter myself. Therefore, the ARC keywords (strong or weak) have no meaning, I assume, so I eliminate them. This works fine on Xcode 4.3, but when my coworker opens them on XCode 4.2 the compiler complains that there is no strong/weak keyword, so I instructed him to meaninglessly enter the keyword back in again. Which is correct (with or without keywords)? To be clear: I have a property like this @property (nonatomic)

why is my code outputting *nil description*

家住魔仙堡 提交于 2019-12-31 04:57:06
问题 Code: LotteryEntry.h #import <Foundation/Foundation.h> @interface LotteryEntry : NSObject { NSCalendarDate *entryDate; int firstNumber; int secondNumber; } - (void) prepareRandomNumbers; - (void) setEntryDate:(NSCalendarDate *)date; - (NSCalendarDate*)entryDate; - (int) firstNumber; - (int) secondNumber; @end LotteryEntry.m #import "LotteryEntry.h" @implementation LotteryEntry - (void) prepareRandomNumbers { firstNumber = random() % 100 + 1; secondNumber = random() % 100 + 1; } - (void)

Not able to build my project on xcode 4.2

谁都会走 提交于 2019-12-31 02:56:26
问题 I have upgraded my xcode to 4.2 (using snow leopard).Previously i was using Xcode 3.2.6 and my project build successfully with it. Now I'm unable to build it, instead Xcode emits the following error ld: warning: option -A is obsolete and being ignored ld: entry point (start) undefined. Usually in crt1.o for architecture armv7 Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1 The error seems to be some compiler error but can't figure it out .:( I

Xcode Project-Wide compiler flag

回眸只為那壹抹淺笑 提交于 2019-12-30 04:40:33
问题 With Xcode 4.2 and the LLVM compiler, when compiling for ARMv6 there are some very weird bugs in the generated application (such as "width" property of CGSize returning the "height" instead). To fix this, I found I must set the compiler flag -mno-thumb. I know how to set compiler flags on a file-by-file basis, but is there a way to set a compiler flag for the entire project? 回答1: You can set project wide compiler flags in the project settings under the "Language" section of the "Build

Storyboards orientation support for xCode 4.2?

会有一股神秘感。 提交于 2019-12-29 04:41:12
问题 I upgraded to xCode 4.2 and it's new Storyboards feature. However, could not find a way to support both portrait and landscape. Of course, I did it programmatically, with 2 views, one for portrait and one for landscape, like in old days, and: if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) { self.view = self.landscapeView; } else { self.view = self.portraitView; } But I was looking for a way to do this

Objective-C, Need help creating an AVAudioPlayer singleton

六眼飞鱼酱① 提交于 2019-12-28 12:49:34
问题 I'm working on a soundboard app, that has several pages of buttons to play sound effects with a stop button on every page should the user wish to manually interrupt the clip. I'm using avaudioplayer in each view to play the sound upon pressing the button for that clip. It works fine until the view is changed. If a user jumps to a new page the sound keeps playing and the stop button stops working even if they return to the original view. Pressing a sound button no longer interrupts the running

Objective-C, Need help creating an AVAudioPlayer singleton

别等时光非礼了梦想. 提交于 2019-12-28 12:49:32
问题 I'm working on a soundboard app, that has several pages of buttons to play sound effects with a stop button on every page should the user wish to manually interrupt the clip. I'm using avaudioplayer in each view to play the sound upon pressing the button for that clip. It works fine until the view is changed. If a user jumps to a new page the sound keeps playing and the stop button stops working even if they return to the original view. Pressing a sound button no longer interrupts the running

Coordinates all wrong on iPhone 3G? It could be your compiler

有些话、适合烂在心里 提交于 2019-12-28 06:45:13
问题 Note: This is question to which I have already found an answer. It seems that posting a question after finding an interesting answer is encouraged, so I am posting this. Someone else is likely to have the same problem and find this useful. I have an iOS app that produces charts. Shortly after publishing an update, a user sent me this panicky email: "the latest update has modified the curves ... not seen more growth curves and inserted data are represented as a line descending ... before you

Installing Core-Plot in Xcode 4.2 for iOS project

陌路散爱 提交于 2019-12-28 05:29:09
问题 I am trying to install Core Plot into my iOS app. I have followed the instructions on the Core Plot website but they are very brief and have no screenshots. I have pasted the instructions below and explained where I am stuck... First, drag the CorePlot-CocoaTouch.xcodeproj file into your iPhone application's Xcode project. Show the project navigator in the left-hand list and click on your project. Select your application target from under the "Targets" source list that appears. Click on the

IBOutlet properties does not update when using prepareForSegue method

两盒软妹~` 提交于 2019-12-28 03:11:05
问题 I am having problem passing value to a IBOutlet property of destinationViewController but it works fine on ordinary property see code below - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"NewsCellToDetail"]) { testViewController *viewController = segue.destinationViewController; viewController.titleLabel.text = @"test"; // set the IBOutlet label text to something NSLog(@"%@",viewController.titleLabel.text); // this will output to