Tag: xcode4.2

Lexical or Preprocessor Issue with “#import <map>

I have an XCode 4.2 project that I’ve been working with all day just fine and all of the sudden, after an XCode crash, my project started to compile with the error: “file myClass.m: error: Lexical or Preprocessor Issue: ‘map’ file not found” where myClass.m uses: #import <map> #import <vector> I’ve tried a clean build […]

Cannot scroll in UIWebView in iOS

I created a webview programmatically and I am unable to enable scrolling in this view. How do I enable scrolling? UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0,40, 325, 1000)]; webView.contentMode = UIViewContentModeScaleAspectFit; [webView setBackgroundColor:[UIColor clearColor]]; [webView loadHTMLString:html baseURL:nil]; [self.view insertSubview:webView atIndex:0]; Thanks In Advance !

Force iOS app to launch in landscape mode

I am developing an app for iOS 5, which have to run in landscape mode. My problem is that I cannot get it to flip initially. I have tried the adding “Initial interface orientation” set to “Landscape (right home button)” and adding the following method to my view controller: – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES […]

Making the launch image display longer xcode

I need help with launch images on iphone. In the project settings on xcode theres an option to add launch images. I added it and it displays for 2 seconds… I want it to be more… How can i change it? Thanks 🙂

Objective-C, Need help creating an AVAudioPlayer singleton

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 […]

iPhone/iPod Touch: application executable is missing a required architecture

I have an issue with xCode 4.2. I am getting this error when building: 2011-06-18 13:35:49.839 Validation[4110:607] *** Warning: Defaulting to the standard codesign tool warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033) Unable to validate your application. – (null) I […]

connect button to TableViewController in xcode

I have a button in my view controller and I want to connect my button to table view controller (It means that when I click on button it loads and brings my table) but I don’t know how should I do that(I can connect my button to another view controller but not to the table […]

IBOutlet properties does not update when using prepareForSegue method

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 nil viewController.textTest = […]

Some questions about Automatic Reference Counting in iOS5 SDK

I’m currently developing an app for iPad. The development started for iOS 4.2 and is now continuing (and I think will be completed) for iOS 4.3. I just read about ARC in iOS 5, and basically I understood that we will never need to release and retain objects anymore. My questions are: If I decide […]

Why is @autoreleasepool still needed with ARC?

For the most part with ARC (Automatic Reference Counting), we don’t need to think about memory management at all with Objective-C objects. It is not permitted to create NSAutoreleasePools anymore, however there is a new syntax: @autoreleasepool { … } My question is, why would I ever need this when I’m not supposed to be […]