iphone

Adding a newline to a UITextView

I've been searching for an answer to this question on google and some other forums, but I haven't found the answer yet. It seems like a simple enough question: how do I manually insert a newline into UITextView's text field? If it matters, I'm reading my string from an SQLite database. That means that I'm translating a const char (I thi...

Programming tools for iPhone and iPod touch

I heard that the programmings tools can be downloaded for free. I also heard that the programmings tools cannot be downloaded for free. Which is it? ...

How do I access only one of my touches in my touches began event

I have: UITouch *touch = [touches anyObject]; if ([touches count] == 2) { //preforming actions } What I want to do Is ask it inside of the ifstatement where the two touches are seperatly. ...

UIPickerView column Titles

Hi, I am looking for a way to add a title to each column (component) of the UIPickerView. In all the examples I've seen there are no titles because in general the columns meaning could be figured out based on its order, content and context... however in my application it would be dangerous to confuse the columns so I need to give them t...

Is NSPersistentStoreCoordinator Thread Safe?

I'm working on an iPhone app that uses Core Data. The app makes a call to a web service, parses the resulting XML file, and then creates or modifies Core Data objects in my app. I already handle the web service call and parsing asynchronously, but I've been handing the parsed data back to the main thread to manipulate the Core Data objec...

Animate UITableView change

I have a two row tableview (username and password) and when the user hits enter it tries to login and switches the two cells to a single loading cell. While I am going from 2 to 1 cell, the new cell is twice as large (minus 1 px for the separator). I would like to fade between the two states. How would I do this? ...

Where to use UIActivityIndicatorView ?

I have written my code in -(void)loadView{ } to get an image from internet using NSURL. But before loading image I need to show the spinner( UIActivityIndicatorView ). #import "ImageFromWebViewController.h" #define USE_TEST_SERVER 1 @implementation ImageFromWebViewController +(NSString *)fileName { #if USE_TEST_SERVER return @"ht...

how to show status bar on camera view and so on

Hi, I am working on a camera view of iphone app. In my whole app i m showing the status bar. If I do not navigate to camera view , all the views work fine(shows the status bar) but when i navigate to camera view, status bar goes hidden on all the other views(those were working fine earlier) also lost the status bar. status bar only hid...

Finding Capacity Remaining In An iPhone Battery

Does anyone know how (if possible) I can find out how much capacity (mAh) is remaining in an iPhone battery at any given time? Something like the program above? Is there a value stored in a plist somewhere?? ...

How to share contacts?

Hi All, By using IPhone SDK (on a jail broken iPhone), how can I share a contact (.vcf file) through mail as same as the address book is doing? Regards, Prathap. ...

iPhone UnitTesting UITextField value and otest error 133

Are UITextFields not meant to be part of the LogicTests and instead part of the ApplicationTest target? I have a factory class that is responsible for creating and returning an (iPhone) UITextField and I'm trying to unit test it. It is part of my Logic Test target and when I try to build and run the tests, I get a build error about: ...

iPhone SDK: How do I properly save user-inputted information into a .plist or other file?

I've looked through the SDK documentation and through other questions that have been asked, and I am still a little confused on how exactly to do this. I had been previously been working with the following code, though it does not give the desired result of a .plist file. Besides mentioning the IBAction in the header files in this code...

Decompile iPhone app binary

Hi, Is there a way to decompile an iPhone binary file in order to extract it's resources like images/sound files etc? Thanks. ...

Problem releasing object using "removeFromSuperView" iPhone.

Hi I have this concrete problem, but if You find my initial design idea crazy and have a better suggestion, please let me know:) I have a UIView that acts as a container/background for adding other views. The important thing is that only one view is present at a time. So before doing any adding of views I do this: for(UIView *...

UIScrollView not scrolling

I'm loading a UIScrollView with UIImageViews. imageViews below is an NSMutableDictionary of UIImageViews. The scrollview is an IBOutlet with scrolling and paging enabled. The loop adds two images. However, I only ever see the first image in the scrollview and am not able to scroll. Is there something else I need to enable for scroll...

How to move UITextView correction suggestion above text

I'm using a UITextView to roughly replicate the SMS text box above the keyboard. I'm using a UITextView instead of a field so that it can expand with multiple lines. The problem is that, in my UITextView, the correction suggestions pop up below the text, causing them to be partially obscured by the keyboard. In the SMS app, the sugges...

Correctly deallocating a view

In a view based app, I display a view and once the user is finished with that view, Done is clicked and the view is removed. However, that does not dealloc the view, which is what I want to do. What is the proper way to dealloc this type of view? Currently, I'm nil'ing out the second view before it is called. That seems to work and t...

Is it possible to programmatically change the name of an iPhone app once it's installed on a device?

Hey everybody, I'm curious - is it possible to programmatically change the name of an iPhone app that is used on the iPhone OS home screen? I know it's just an entry in the Info.plist file, but I haven't seen any apps doing it. I'd like to distribute a "Lite" version of an existing app and allow users to upgrade to the full version via...

What are the differences between Xcode generated .nib/.xib and interface builder .nib/.xib template?

I am new to iPhone development so I have been working through some tutorials. What I don't understand is how xib fit into the work flow. In a tutorial, one of the instruction is to create a new UIViewController subclass with "XIB for User Interface" selected. On my first try, I neglected to check that option and I thought may be I c...

Which JSON library to use for data on iPhone

There appears to be at least three different libraries for extracting JSON data from an HTTP request. TouchJSON (http://code.google.com/p/touchcode/) BSJSONAdditions (listed at json.org - http://blakeseely.com/blog/archives/2006/03/29/bsjsonadditions-12/ json-framework (http://code.google.com/p/json-framework/) Any reason I would sel...