iphone

iPhone App: How to get data from an API, parse, and store for later use?

I'm new to iPhone app development so excuse me if I use the wrong terminology, or ask the wrong questions. Basically, I'm trying to write an App that includes downloading a dataset, saving it for later, and checking if the dataset has been updated, but I don't know where to begin. When I say dataset, I mean a multi-dimensional array of ...

How do I draw a line on the iPhone?

I am a beginner at iPhone programming, and would like to draw a line to the phone screen for the purpose of study using Quartz and UIKit. How do I start drawing? ...

how do I store data from sqllite database via iphone development

Hello i have a problem in storing data on server from sqlite database. Here is my code NSString *query = @"SELECT ROW,PHOTO1 BLOB,BLG_NAME TEXT,ST_NO TEXT,ST_NAME TEXT,ST_DIR TEXT,MUNI TEXT,PROVINCE TEXT,BLG_TYPE TEXT,BLG_ACC TEXT,BLG_AMN TEXT,LONGI TEXT,LATI TEXT FROM ATTRI4 WHERE FLAG = ?"; sqlite3_stmt *statement; if(sqlit...

xcode gives syntax error on cpp code

I am trying to reuse Apple's Speak Here sample code in my own iPhone app. I downloaded and compiled the project with no problems, so I then added some of the files to my own application. When I try to compile my own application, the compiler gives me MeterTable.h:54: error: syntax error before 'MeterTable' The relevant code is: #inc...

Why does setting the anchorPoint of the layer's bounds rectangle behave so strange?

I try to set the anchorPoint property, in order to rotate a view by a well defined axis. But: myView.layer.anchorPoint = CGPointMake(myView.layer.anchorPoint.x - 1.0, myView.layer.anchorPoint.y); Wenn I shift it by -1.0, it will not just move 1 unit to left. Instead, my whole view moves by the width of the view to right. What kind of...

iPhone & SQLite: Some database changes are not persisting after app close and relaunch.

Hi there, I've got an iPhone app I'm developing and when the app launches I open an SQLite database connection, and I close it when the application terminates. The database is correctly in the applications documents folder. During the lifetime of the app I run several INSERT and UPDATE statements. However, for some reason my UPDATE sta...

Where does apple mention all the important heights of UI components?

Tab bar, navigation bar, tab bar icons, heights of UI controls... I've been reading the Human Interface Guidelines now the whole day, but they rarely mention heights. Do I look in the wrong place? Is there any document from Apple that mentions them in one place? ...

How can I rotate an view based on an rotation origin, whoose position is specified in the view coordinate system?

I find this pretty confusing. When you want to rotate a view, it's going to be rotated by it's center point. But that's not always good. So if you need to rotate by an specified origin in your view, you would have to set the anchorPoint property of the view's layer. Now, the problem is, that this anchorPoint property takes pretty confu...

Distribution Cert has no private key. Valid signing ident matching profile cannot be found.

Hello, I've been able to generate and use my development cert & provision for some time. I did have some problems after upgrading xcode, in that the login certs where getting trashed/removed, but I fixed that. I'm trying to create my distribution cert & provision. I've noticed that the distribution cert doesn't have a private key - you...

Changing the delete accessory view in a UITableViewCell

Is it possible to change the view shown in response to a left to right "I want to delete this row" swipe in a UITableView's UITableViewCell? Currently the 'delete' button seems to ignore all of the other UITableViewCell customisation options. ...

How can I make a view get bigger again, as soon as the status bar goes back to normal height after a phone call?

In the simulator I went to Hardware menu and activated the simulation of bigger status bar during phone call. Now, I tried to make a view in my nib that takes up the whole screen. As soon as the status bar gets smaller, I want my view to get bigger, so it uses that space up there. But regardless of any autoresizing settings, my view wi...

Convert UIWebview contents to a UIImage

I am using a UIWebView to display HTML formatted text. I am not loading a webpage, just supplying a string of HTML to the UIWebView. Now I want to animate this UIWebView on screen, actually several of them (2-10 at a time). UIWebView is a little heavy, and although I haven't attempted it yet, I am planning for the worst. (I don't think...

How high is a tab bar in iPhone OS?

I tried to get that info, but google returns me just nothing about that. Does anyone know that exactly? I remember a value around 40 units, but I am not sure. The Constants.h of UICatalog.xcodeproj doesn't mention it. ...

Convert .caf to .mp3 on the iPhone

Hello, is there a way to convert my recorded .caf files to .mp3 using the iPhone SDK / Core Audio, something else? I've been looking around for a while, but all I've found was a command line uitility (which isn't allowed to run on the iPhone). Regards ...

How to Connect a Table View to a Sortable Data Source

I have a Table View Controller that is displaying a list of Messages. I want the user to be able to pick different sorting options for their Messages. Some possible sorting options might be most recent, read/unread, by sender, etc. What I'm debating in my own mind is the proper way to manage the underlying list of Messages. Here is m...

Is including libCurl in an iPhone app store app allowed? Anyone done this?

I would like to use libCurl in an app for communicating with web services, and unfortunately it is not included int he iPhone SDK. Now I've figured out how to include Curl as a static library in my app, however, I'm wondering if this will get my app rejected with Apple. Has anyone included Curl in an app and had it approved by Apple? ...

How to access UITableView subview selection

I've created a UIViewController (AnestDrugCalcViewController) that has a button that opens a UITableViewController (DrugTableViewController) to select a drug. The DrugTableViewController is populated based on a NSMutableArray and is made up of several NSDictionary objects (drugName, drugDose, drugConcentration, etc.). I'm able to open D...

Recent searches with Core Data

I'm making a Core Data app for the iPhone, but hope the question applies enough to Mac OS X to be answered in that context with no NDA issues. When a user does a search, I am saving each result into a context using entity Entry. I want these results to be retrievable later under a Recent Searches section. What's the best way to go about...

What's this (NSNull*)controller == [NSNull null] supposed to do? Why not just controller == nil?

In an Apple example I've seen this: myController *controller = [viewControllers objectAtIndex:page]; if ((NSNull *)controller == [NSNull null]) { controller = [[myController alloc] initWithPageNumber:page]; [viewControllers replaceObjectAtIndex:page withObject:controller]; [controller release]; } I am very interested in this line: ...

Offset when displaying an UITableView

I display an UITableView, and from time to time, the first row appears at the bottom of the view. There is nothing above the first row, and the empty space isn't touchable. So far, I've checked: headerView of tableView : is empty use plain UITableViewCells check the rowHeight of the cells check the frame of the cells when the bug hap...