iphone

iPhone - removing subviews from UIScrollView - memory-leak

Hi developers, I am currently working on an application which displays several UIViews in a UIScrollView. This UIScroll is inside a UIViewController. (In a loop I am creating new UIViews with autorelease and add them to the scroll view. Could this be the problem?) When I try to release the viewController all the subviews with their l...

How do I cancel a text field edit in a UIWebView?

I'm working on an application with an embedded UIWebView. The user has the ability to enter a location in a text field in the web view but an effort is also made to discover the current location using Core Location. If Core Location comes up with an accurate answer and the user is currently editing the location I'd like to cancel the e...

Import RSA keys to iPhone keychain?

I have a couple of NSString objects that represent an RSA public-private keypair (not generated by SecKeyCreatePair, but by an external crypto library). How can I create SecKeyRef objects (which are required for the SecKeyDecrypt/Encrypt methods) from these NSString objects? Do I need to import them into the Keychain first? If so, how? ...

What does CGColorGetComponents() return?

CGFloat* colors = CGColorGetComponents(hsbaColor.CGColor); Does this return a float, or an array of floats? It looks like the asterisk is shorthand for creating an array. Is that correct? When I call this function on the CGColor property of an HSB UIColor object does it convert the values to RGB? ...

Which other languages/IDEs are setup like iPhone/Xcode?

In know the question isn't exactly programming related but I think this forum is the best place to ask. So, with risk of the question being pulled, here goes... What other languages/IDEs are setup as well as the iPhone with Xcode and Interface Builder? Apple uses one design pattern and uses it extremely well - MVC. IB doesn't have any...

iPhone/Xcode: can different project targets have different bundle identifiers?

I'm a little confused how this works - this is my understanding: A target's provisioning profile is linked to a specific app ID The bundle identifier for a target is found under Target info\Properies\Identifier But... bundle ID is also located in Info.plist. It seems that if you change the bundle ID in Info.plist, Xcode changes it au...

jQuery not loading on the iPhone

Hello all, I'm trying to use a UIWebView to display content, and jQuery to manipulate that content, but I can't get jQuery to load. Here's the code that I have setting up the UIWebView, setting the baseURL, and loading the content (an HTML file that's in the local bundle): UIWebView *view = [[UIWebView alloc] initWithFrame:[[UIScreen m...

how to fit a text in UILabel when the size is not proportionally

as title how to fit a text into a UILabel when the width and height is not proportionally. in my application, the label width is 100.0, height is 500.0, and the font size is 400, the result show up in simulator was the text out of frame and cannot display completely, if i enable the auto adjust to fit property, the font size no longer be...

Development platform for iPhone application

I am new in iPhone application development and currently working on .net (C#). Please suggest the development platform to create iPhone application so I can adopt very soon. Which is best among these: Xcode Unity using script language c# tersus Or any other tool that is not on the list. Is it possible to develop iPhone applicatio...

Formatting URL parameters in an NSURL object

I want to pass parameter in NSURL i.e. I have NSURL *url = [NSURL URLWithString:@"http://demo.digi-corp.com:82/Nilesh/betBuddy/api/getEventsXML.php?sp_ID=2"]; where sp_ID can be 1,2,3,4 etc. how can i do it?? plz help me out? ...

How can I make a weak reference to a parent object when using properties?

I am not sure about it. Would I do that this way? @property(nonatomic) MyParentObject *parentObject; Note that I just left out the retain Keyword. Or would I have to write the Setter by myself? ...

segmented control in iPhone application

Hi, I've put UIsegment Control in my IPhone application.To load the pages I've this function - (void) segmentSelected:(id)segmentedCntl{ NSLog(@"Selected Segment Index = %d", [segmentedCntl selectedSegmentIndex]); int index = [segmentedCntl selectedSegmentIndex]; ViewController *viewController = (ViewController *) controller...

Will the -dealloc method be called upon application quit?

Apple says, that in Cocoa -dealloc will not be called neccessarily when the application quits. Does this also apply to the iPhone? ...

iPhone UITextField: how to insert new line by the return key?

Hi, I want to get a carriage return/new line by hitting the return key on an UITextField's keyboard. I've found out, that textFieldShouldReturn gets called. But how do I insert a carriage return in the text field? ...

play two sounds simultaneously iphone sdk

I am trying to make a small music app on the iphone. I want to have an octave a piano which will respond to touches and play the key or keys that the user touches. How would i be able to get two or more sounds to play at the same time so it sounds like a chord? I tried using AVFoundation but the two sounds just play one after the other. ...

Activate airplane mode programatically?

Hi! Does anyone know how to de/activate the airplane mode programatically on the iPhone (OS 2.1)? ...

How to set up CMake to build a library for the iPhone

I'm trying to use CMake to generate an Xcode configuration for the iPhone by manually setting certain attributes. (Is this even the right way to go about this?) My CMake file looks like: project(MYLIB) set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) set(CMAKE_CONFIGURATION_TYPES Debug Release Debug-iPhone) set(FILES list of my files....

How to add a view above my NavigationControllers TableView

I have created a reusable class that fades in a "loading message" and indicator at the foot of the devices screen. The problem I have is that when I'm adding the loadingview to a view that is contained in a NavigationController I want the view to stay at the bottom of the screen, even when scrolling the tableview. How can i add a view...

How do I center a UIImageView within a full-screen UIScrollView?

In my application, I would like to present the user with a full-screen photo viewer much like the one used in the Photos app. This is just for a single photo and as such should be quite simple. I just want the user to be able to view this one photo with the ability to zoom and pan. I have most of it working. And, if I do not center my U...

SQLite DB Wrapper Not Responding to Message? Unrecognized Selector!

Hey Folks, I'm developing for iphone-sdk 2.2.1 (so no CoreData cry). So I'm using the FMDatabase project, which is just a SQLite Wrapper in Obj C. I have my DB working well when interacting with it from my AppDelegate. I've tested connecting, INSERTING, etc from the AppDelegate. Now, I have a data object that I want to store into th...