xcode

resignFirstResponder not hiding keyboard on textFieldShouldReturn

Hi everyone, I have a view with a UITextField which should hide the keyboard when return is pressed. My function is this: - (BOOL)textFieldShouldReturn:(UITextField *)textField { if ( textField == userPassword ) { [textField resignFirstResponder]; } return YES; } Normally the keyboard should be hidden but it stays on the screen...

Is there a way to have XCode Brackets appear on the next line?

In XCode, autocompletion has the first bracket appear on the same line: if (<#condition#>) { <#statements#> } Is there a way to have it appear like so, so that I dont have to change it every time? if (<#condition#>) { <#statements#> } ...

<string.h> conflicting with my own String.h

Hi! I have a project that was compiling ok within g++(I can't see the version right now) and now on xCode it is not. I think that I got the problem now... I have a String.h file in my project and it seems tha the xCode compiler(that is gcc) is trying to add my own string file from the < cstring >... I am not sure of it, but take a look ...

Help with a method that returns a value by running another object's method

I have a Class that runs the following method (a getter): // the interface @interface MyClass : NSObject{ NSNumber *myFloatValue; } - (double)myFloatValue; - (void)setMyFloatValue:(float)floatInput; @end // the implementation @implementation - (MyClass *)init{ if (self = [super init]){ myFloatValue = [[NSNumber alloc]...

Circle and Sphere in OpenGL ES

In OpenGL ES 1.1 (using Objective-C), what is the easiest way to create a circle, and for a sphere? I would prefer for it to be easy to implement, as I am new to OpenGL. Thanks jrtc27 ...

Install my compiled libs in the system to be used by an executable

Hi! I am using Xcode and, after some struggling, it is compiling my dynamic libraries okie dokie for now. My kinda-problem now is that I need to use those libs with another project, that is an executable. I would like that Xcode, after compiling my libs, copy them to the executable folder, or, better, copy the libs to a system dire...

How to put a small custom toolbar above the Keyboard that moves up and down with it?

How to put a small custom toolbar above the Keyboard that moves up and down with it? ...

iPhone OS Deployment Target after update to iPhone SDK 4

I just updated to iPhone SDK 4 and am trying to debug on my device with 3.1.3 installed. Before the update, I compiled with Base and Active SDK set to 3.1.3 and all was well. After the update, I'm limited to SDKs 4.0 and 3.2--setting the base to 4.0 and iPhone OS Deployment Target to iPhone OS 3.1.3, I'm able to build and install on my 3...

Hardcode or Plist, Which should I follow to display data in UITextView?

I am writing code to put a label, image and description on a view. The label and image are working but i don't know how and where to write code for my description details. For e.g When a user taps in university, I have a UITextView where the description suppose to appear but have no idea. Please can someone help me out with a detailed wa...

what is the best way to play sound quickly upon fast button presses xcode?

hi i have a soundboard its just a screen with about 8 buttons. each individual button will have its own sound which will be played upon button press There are a couple of ways i could play the sound, such as using SystemSound or AVAudioPlayer system sound so far seems have the quickest response times, avaudioplayer is quite slow, it cant...

Are Apps using iAd compatible with older iOS

Can I add the UIBannerViewDelegate protocol to my UIViewController subclass while remaining compatible with pre-iOS 4 devices? This is NOT a duplicate, the question is specifically related to the delegate protocol. ...

pre-iOS 4 devices delegate protocol

Can I add the UIBannerViewDelegate protocol to my UIViewController subclass while remaining compatible with pre-iOS 4 devices? This is NOT a duplicate, the question is specifically related to the delegate protocol. ...

-ObjC Flag in Xcode Issue

Hi all, I am trying to build a simple iPhone app that calls several static libraries. However, it seems when I include the linker flag "-ObjC" and "-all_load" (as I need to for one library), it causes the linker error: ld: duplicate symbol _OBJC_METACLASS_$_ASIFormDataRequest in /Users/XXXXX/Projects/AppName/Dependencies/Library1/lib1K...

iphone app name changed in "release" mode

I am getting ready to submit my first app and for some reason when I changed xcode to "release" mode - the name below my icon changes. The info.plst file still says [Product_name] and when I go into the info section of the app it still says what I want it to say under Product name. When I switch back to debug and run the app the name i...

__COUNTER__ equivalent on Xcode?

Hi! I am migrating a project from Linux to Xcode and I encountered a "version" problem.. I need a unique identifier at compile time for my dynamic stuff, on linux I was using the __ COUNTER__ preprocessor, but it seems that the gcc 4.2 used in Xcode doesn't know about __ COUNTER__ yet... So, I was wondering what I could do to solve th...

Base SDK missing - red .app portion???

I am reading the provisioning profile stuff on the app store website and am having a heck of a time figuring everything out. I have my distribution certificates and everything but I think that something is massively messed up in xcode. When I switch to my distribution profile in the overview pulldown - it immediately changes to "Base S...

Debug/Distribution discrepancy in Xcode

I have searched and figured out how to change the name of my app (going through and changing the Product_Name) that shows up below the icon so now my app doesn't use the arbitrary name that I picked out when I started developing. Now that I am using a distribution certificate - it goes back to the old one. I changed the name of the .ap...

apple not currently accepting applications built with this version of the SDK?

My binary was rejected with the error above as the reason. I checked my xcode settings and under the "General" tab of info I have the Project Format set to Xcode 3.2 compatible which is the highest available. I have the Base SDK Configurations set to iPhone Device 4.0 - also the highest available. In the "Build" tab, I have the Base S...

iphone sdk Creating custom Templates

Cocos Provides a .sh file to install cocos2d templates. My task is very much similar to that. I have to create One User Template Group. Similar to screen shot. My question is how ? How to create a group under "user templates" ? ...

iPhone: Help. Extracting stderr/messages from GDB and copy to string.

Hi, So the whole idea is this. I need to save those debugging console messages to some strings and then write it to the text file. I have no problem with the writing to text file part as i will be using writeData but I have problems with the first part. in the console i see these error messages when opening corrupted image files in UII...