iphone

iphone 4 high res startup image

Hi Guys, I have a fullscreen iphone web app that has a startup screen that works. I am trying to figure out how to get this image looking better on the iP4, but if I change the size from 320x460 it simply will not load. Anyone find a solution yet? Thanks, Peter ...

How should I architect my DB & API server for a turn based multiplayer iPhone board game? (thinking about nodejs, mongo, couch, etc)

I'm working on a turn based board game for iPhone and eventually Android. I'm using Appcelerator Titanium to develop it. My multiplayer design is similar to Words With Friends. Users take turns when ready, and then the opponent's game board is updated accordingly. One of my needs is to have a messaging API which enables the 2 players' d...

How do I reload a NSFetchedResultsController?

I have an app that preloads a months worth of data and it gets released a day at a time. NSDate *now = [NSDate date]; // Create predicate NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(location.name == %@) AND (date < %@)",longLocation,now]; Everything worked great before multi-tasking, but now that it no ...

objecive-c if statement

what would be the if statement to check to see if an entity attribute (sqlite table) had some data in it? I've been trying this: if (recipe.image != nil) { do something } thanks ...

Is it Safe/Good practice to save global values in NSUserDefaults?

I am making an IPhone app in which userid and password is required in all the screens to make requests to the server, and I am thinking of saving those 2 values in NSUserDefault instead of passing an object around. I am also thinking it will be useful if user has logged in once, and use the app again then user don't have to ente...

App crashes with EXC_CRASH (SIGABRT) in Titanium's TableView

I'm on Titanium 1.2.1 using SDK 4.0 compiling to a device with 3.1.3. This crash doesn't manifest itself in the simulator, but only on the device. I have a tableView listing a list of contacts. When clicking on a contact name, it opens a new heavyweight window (in a different execution context). The new window shows details of the contac...

How to update or reset a UIView with a custom subview?

Hey everyone, I have a UIView in a UIViewController to which I add a custom subview in the viewDidAppear method. MyView *myView = [[MyView alloc] initWithLabelText:text]; [self.view addSubview:myView]; [myView release]; The text variable is a string used on a label in myView. This text changes every time you come back to the current ...

How to do this MySQL Query in Core Data?

How would I do the equivalent of this statement in Core Data? Basically I want to get a list of the 10 most occurrences of foo along w/ how many times it occurs. Basically I'm recording all of my users searches as individual entries in Core Data. I want to be able to select their 10 most searched items and display them in order starting...

iphone uiview - resize frame to fit subviews

Shouldn't there be a way to resize the frame of a UIView after you've added subviews so that the frame is the size needed to enclose all the subviews? If your subviews are added dynamically how can you determine what size the frame of the container view needs to be? This doesn't work: [myView sizeToFit]; ...

iphone - more than one button in leftBarButtonItem of a navigation controller

When I push a new view controller onto the navigation stack, the leftbarbuttonitem changes into the Title of the previous view controller, as expected. But I need to add an additional button to the nav bar, just to the right of the back button. I still want the back button to work as normal. Any suggestions on how to do this? ...

Saving UIImage to core data is using up RAM. What the hey?

Here's a little background: I'm storing pretty big images (900x1200 pixels) in Core Data. These are coming from the UIImagePickerView, and I crop and resize them into this reasonable size. I'm using a pretty standard value transformer to convert between the UIImage and NSData (and back.) The program works, but it ends up getting memo...

Download new classes to iPhone?

I want to be able to add additional classes to my iPhone app without having to go through the 7 day update process. It is like Consume by Bjango where they can update the providers and fix urgent issues without going through Apple's process. The code I need to upload needs to be its own class. This way I can add additional services (lik...

Does an In App Purchase's Product ID have to begin with a Reverse-DNS?

Does an In App Purchase's Product ID have to begin with a Reverse-DNS like com.mycompany.My_Awesome_Game.Level_Pack_1 or can it just be standalone like Level_Pack_1? ...

Error when compiling for device but not simulator

I get the following error when compiling my project for the device, but not the simulator: error: objc/objc-class.h: No such file or directory One of the files i have imports objc/objc-class.h and this is where it chokes. Base SDK is iPhone OS 4.0 and deployment target is OS 3.2 Thanks ...

Bug when create a ViewController by code!

I create new "Window-Based" project in xCode and a subclass of UIViewController name Main View, colour MainView with blue. In My App Delegate i have method: - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after application launch mainViewController = [[MainView al...

Unrecoganized selector sent to an instance while unit testing iphone app in xcode 3.1.3 ?

Hi All, I have created a sample app for AES encryption. It adds two methods to NSData as a category. But I am to build it successfully while compiling. After that I decided to unit test the app with unit test bundle. Then in the first method I added the code - (void) testPass { AESKit *m_objAESKit=[[AESKit alloc] initwithUserData...

CABasicAnimation Repeat itself

I have a CABasicAnimation that I perform on multiple layers and all it does is move the UIImageView up 10 pixels and then back down. I want this to continue ad infinitum. When the animation finishes I can't figure out how to get it to do it again! I understand theres a animationDidStop method but that doesn't solve my problem because I c...

How to embbed video on uiview or uiwebview

There are some apps in the app store that have a video stream without using mpvideo and they are embbeded on the uiview or uiwebview. How is this implementation done? Any help is great thanks. ...

Using Route-Me to as Mapping Alternative

I would like to user route-me in a mapping application because I need to support disconnected use 90% of the time. I have looked at their tutorials, but I am looking for how to download tiles and store them on my device so the application works with no network connectivity at all. If I missed a similar question in stackoverflow, I apol...

iPhone - Displaying a single string in a view programatically

We have a window filled with little view squares (think of a Calculator). For a specific view on the window we want display a single string in the view without using the Interface Builder to add the string. We need to be able to change the string and have the view refresh. How do we programmatically add a string to a view and show it?...