iphone

How can I resequence a primary index in sqlite for use with a UITableView?

I'm new to sqlite so please be patient :) I've got a UITableView reading the data from a sqlite db. If i delete a record, the row in the db is deleted. The problem is that the other rows keep their primary keys, so for example, I have 3 rows and the primary keys are 1,2,4. is there any possibility to update the keys to be 1,2,3? Thanks...

Can I use the Google AJAX Feed API REST interface from a native iPhone App?

Google states the following in the AJAX Feed API docs:"Applications MUST always include a valid and accurate http referer header in their requests." I am building a native iPhone application and would like to use the Google AJAX Feed API's REST interface from my app's native objective-c code. Is the API only for use on websites, or can ...

Simple NSURL right out of Apple docs not working?

ok, nothing special here, no errors, and I do declare NSMutableData *receivedData; but I'm returning <> when I expect a web page returned; what's going on? - (void)viewDidLoad { [super viewDidLoad]; NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com"] ...

Flicking through pages / photos with UIImageViews (similar to Facebook photos app or home screen)

Hello, First of all, I'd like to point out that I'm not asking for code. I'm just asking for the sort of things I'd need to do to get this to work, as right now I've absolutely no idea. Here's what I want to do: Similar to viewing someone's photos in the Facebook app, I'd like to display an image (UIImageView) on the screen. When the u...

Removing multiple ViewControllers iPhone tabbar app

OK so having a real headache with this one and most of the day has been wasted! with little progress! The app: I have a tab bar application each tab has its own view controller and associated view. Say on tab 1 a user clicks on a button to go to a different view i have implemented the following: [self.view addsubView:view 2] I keep a...

problems getting HTTPRiot working

I've got an iphone app where I'm trying to use HTTPRiot to make some API calls to a web app. Problem is I can't see that none of the HTTPRiot delegate methods are being called. I've got a log in all the delegate methods, and I'm also looking at the webserver log. I see that the URL is being hit. //API.h #import <Foundation/Foundation...

iPhone app launch time, lifecycle question

I'm trying come up with a method to determine how long after the user taps the app icon it takes for the app to be ready for user input. As far as I know, the first place I can insert code to be run is the main() function in main.m, and the last thing that is done before user input is accepted is call applicationDidFinishLaunching in th...

Has anyone found a way to merge changes in Xcode project or Core Data model files?

Is there a way to use a VCS (I'm using git) and have it work with merges to the Xcode files? For example, if my co-worker adds a new Group to the project, when I merge in his changes, I get the Group merged in? Or if he adds an attr to a Core Data entity, I get that attr in my Core Data model? ...

iPhone view is 3/4 grey, could be rotated incorrectly

Hello, This problem has just come up when I cleaned all targets and soft resetted (held home & power for about 10 seconds) my iPod Touch (2nd gen). It looks like the view might be rotated portrait. Here is a pic of the problem: The view is linked to a XIB file, and I setup landscape in interface builder. I also use <key>UIInterface...

Memory leak on return object

I have a hard time grasping this memory leak in my code. Basically it's returning an object containing a object. here's the following code: -(id) getOptions { FileManager *file = [[FileManager alloc] initWithFileName:@"optionsFile.dat"]; Options *options = [[Options alloc] init]; NSMutableArray *fileArray = [[NSMutableArray ...

[objective-C] get time between two times of the day

Hey, I've already tried with NSDate but with no luck. I want the difference between for example 14:10 and 18:30. Hours and minutes. I Hope you can help me shouldn't be that complicated :) ...

Putting together a valid NSMutableURLRequest using POST for TripIt webservice

Hi Im trying to get TripIt OAuth authentication working, but I find the documentation to go a bit over my head. TripIt docs The paragraph below is from the documentation, I have tried putting together a POST request for a SOAP service where the documentation specified what to put into the headers and how to build an xml for the Http bod...

How to add an extra plist property using CMake?

I'm trying to add the item <key>UIStatusBarHidden</key><true/> to my plist that's auto-generated by CMake. For certain keys, it appears there are pre-defined ways to add an item; for example: set(MACOSX_BUNDLE_ICON_FILE ${ICON}) But I can't find a way to add an arbitrary property. I tried using the MACOSX_BUNDLE_INFO_PLIST target ...

PNGs and UIImage Optimisation

Hi there, Is it better to have a PNG, say 320px x 44px and display it once, or to have a PNG that is 320px x 4px and use [UIColor colorWithPatternImage:]? I know that the iPhone handles PNGs well and decompresses them, so in terms of memory, would it be best to use the smallest possible images, and in this case, use the UIColor method ...

What are the shadow offset and color values to mimic the UINavigationBar Title?

I am adding a UILabel as a titleView to a nav bar. I want the text to look like the title that display in the bar. What are the offset and color to accomplish that? ...

Delegates, can't get my head around them

Hey, I'm looking for useful resources about Delegates. I understand that the delegate sits in the background and receives messages when certain things happen - e.g. a table cell is selected, or data from a connection over the web is retrieved. What I'd like to know in particular is how to use delegates with multiple objects. As far as ...

iPhone animation

I trying to do an animation on the iPhone and I hope someone can help me out here as I'm stumped. I am using CAKeyframeAnimation with CAPath to animate views around. I have these settings set: animation.removedOnCompletion = YES; animation.fillMode = kCAFillModeRemoved; So that the animation is removed from the layer when the anima...

How do I get the RootViewController from a pushed controller?

So, I push a view controller from RootViewController like: [self.navigationController pushViewController:anotherViewController animated:YES] ; BUT, FROM anotherViewController now, I want to access the RootViewController again. I'm trying // (inside anotherViewController now) ///RootViewController *root = (RootViewController*)self....

Is CGLayer a good solution?

Hi guys, I want to add a bit of functionality to my App, and I think that using a CGLayer is the best way of doing it, but have never done any Quartz drawing before (other than some basic tutorials). My intention is to show a full view of an image that my App will draw (basic geometric shapes based on parameters) in the top half of a v...

Design pattern for iPhone -> web service functionality?

I'm developing an app that will talk with a web service exposing multiple methods. I'm trying to figure out what the best pattern would be to centralize the access to the web service, give options for synchronous and asynchronous access, and return data to clients. Has anybody tackled this problem yet? One class for all methods seems ...