xcode4.5

xcode 4.5 runs ios 4.0 simulator (NOT)

最后都变了- 提交于 2019-12-05 11:52:21
I just upgrade to iOS 6 xcode 4.5 But I found that even in Xcode-reference-download there are only ios 5,6 I prefer my app to work also for the users using iOS 4.X Any comment is welcomed. If you're on Lion, you can still download the 4.3 simulator (at least I did with the Gold Master version, supposedly it still works with the final release). On Mountain Lion, the 4.3 simulator is buggy (as seen in the first betas) and has thus been removed by Apple. If you really need to, you can run Lion on top of Moutain Lion with Parallels Desktop or something similar, that's what I do. Matuda I can

ERROR data argument not used by format string on mySLComposerSheet

回眸只為那壹抹淺笑 提交于 2019-12-05 10:52:56
I'm a bit confused at why I'm getting the ERROR 'data argument not used by format string' Has anybody else got this or fixed this in Xcode 4.5 for iOS6? - (IBAction)facebookPost:(id)sender { if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { mySLComposerSheet = [[SLComposeViewController alloc] init]; mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; [mySLComposerSheet setInitialText:[NSString stringWithFormat:@"I'm listening to Boilerroom Recordings via the Boilerroom iPhone Application",mySLComposerSheet

iOS6 UIPickerView memory leak issue.

ε祈祈猫儿з 提交于 2019-12-05 07:53:58
I was getting this memory leak: [UIPickerTableViewTitleCell initWithStyle:resuableIdentifier]; and NSConcentrateMutableAttributedString. Issue was that I had not implemented this delegate. After implementing this now memory leaks goes away. May be this information helpful for other as I spend mine 16 hours only to figure out this issue. // Do something with the selected row. - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { // Get the text of the row. NSString *rowItem = [NSString stringWithFormat:@" %@",

Convert date to next day's date in iOS

流过昼夜 提交于 2019-12-05 07:07:08
问题 I have a date in string format just like 30-11-2012 . I want the date next to it like 01-12-2012 again in string format. Is there any way of getting it? 回答1: You should use NSCalendar for best compatibility NSDate *today = [NSDate dateWithNaturalLanguageString:@"2011-11-30"]; NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents *dayComponent = [NSDateComponents new]; dayComponent.day = 1; today = [calendar dateByAddingComponents:dayComponent toDate:today options:0]; //2011-12

XCode 4.5 warns about method name conflicts between Categories for parent/child classes

只谈情不闲聊 提交于 2019-12-05 05:02:35
I'm working on a project that was originally built in XCode 4.0, and then migrated to using XCode 4.2. Now I've tested out migrating to XCode 4.5, and I'm getting a ton of warnings like below... instance method 'values' in category from <pathToTheFile>/HistoryObject+extras.o conflicts with same method from another category These warnings never appeared in previous versions of XCode, and the code hasn't changed. The project is set at iOS 4.3 for the Deployment Target. So, we have from a previous developer a bunch of DAO type classes that I believe were auto-generated from CoreData, and then

App only rotates in iOS 6 and not in iOS 5

安稳与你 提交于 2019-12-05 00:59:26
问题 I have made an app targeted for iOS 5 and iOS 6, and for some reason it only rotates when using it on devices with iOS 6, wether on an iPhone or an iPad, and doesn't rotate on devices using iOS 5. My app is universal. Please help me resolve this problem! Thanks 回答1: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return ((toInterfaceOrientation == UIInterfaceOrientationPortrait) || (toInterfaceOrientation ==

Implicit conversion of NSInteger error

跟風遠走 提交于 2019-12-04 22:52:10
Using MagicalRecord, I am trying to get the record with a particular clientNumber which is a NSInteger (defined as int16 as the data type). This is my line of code where I'm getting the error: ClientInfo *clientSelected = [ClientInfo MR_findFirstByAttribute:@"aClientNumber" withValue: clientNumber inContext:localContext]; UPDATE: This is the definition of MR_findFirstByAtytribute: MR_findFirstByAttribute:(NSString *) withValue:(id) This is the error I'm getting: Implicit conversion of NSInteger (aka int) is disallowed with ARC For the life of me, I don't see what's wrong. ClientInfo is defined

How to permanently remove xcuserdata under the project.xcworkspace and resolve uncommitted changes

 ̄綄美尐妖づ 提交于 2019-12-04 21:49:54
I am struggling with a problem with a merge conflict (see Cannot Merge due to conflict with UserInterfaceState.xcuserstate ). Based on feedback, I needed to remove the UserInterfaceState.xcuserstate using git rm. After considerable experimentation, I was able to remove the file with "git rm -rf project.xcworkspace/xcuserdata". So while I was on the branch I was working on, it almost immediately came back as a file that needed to be committed. So I did the git rm on the file again and just switched back to the master. Then I performed a git rm on the file again. The operation again removed the

Xcode 4.5 SplitView broken orientation with iOS 5.1 (working on iOS6 thought)

烂漫一生 提交于 2019-12-04 20:51:54
I was working on a splitView project when the Xcode was updated to v4.5. Since then autorotation was working perfectly. After the update, autorotation works only for iOS 6. On iOS 5.1 i am stack in Portrait. I have read all possible solutions but nothing seems to be able to fix my problem. Below is what i have done so far: Checked that All orientations are in my plist. Replaced (BOOL)shouldAutorotateToInterfaceOrientation: with - (BOOL)shouldAutorotate { return TRUE; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll; } - (UIInterfaceOrientation

I have a UICollectionView and i want to show an image in a Cell, that goes to a normal ViewController. How do i do that?

霸气de小男生 提交于 2019-12-04 19:47:14
I have a UICollectionViewController (with a navigation controller) and i want to show an image in a Cell that 'pushes' to a normal ViewController (different by every image). How do i do that? Seem you want to build photo gallery by UICollectionView. If use storyBoard, use segue - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"showDetail"]) { NSIndexPath *selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] objectAtIndex:0]; // load the image, to prevent it from being cached we use 'initWithContentsOfFile' NSString