iphone

Objective-C changes between OS 2.2.1 and OS 3??

When I tried compiling my app for OS 3 I encountered an the following error: error: type of accessor does not match the type of property The error was for a property I tried to access that is defined as follows: NSMutableArray *myArray @property (readonly,nonatomic) NSArray* myArray; the property is @synthesized in the implementati...

MPMoviePlayerController on iPhone 3.0 SDK

Did Apple change anything about the MPMoviePlayerController class on the iPhone 3.0 SDK? My app no longer pops up a video when I tap the correct button, no error popup or anything. ...

Grabbing MS SQL Server Data for iPhone App?

I have a pre-existing desktop application that draws its information from a Microsoft SQL Server. The desktop application is written in C#/ASP/.NET. I'd like to take this same data and present it in an iPhone application. What would be the best way to obtain and present the data? ...

How to implement slurp effect on iPhone?

The iPhone has a private list of effects that Apple uses, such as "genieEffect" and "slurpEffect". I'm wondering how one would go about implementing the slurp effect (this is when you trash a mail message or a note). I understand how to use Core Animation, but I'm not sure exactly what parts of it they're using to get that animation. ...

How to create relational object in Objective-c for iPhone

Here is the interface of my object: @interface MyItem : NSObject { sqlite3 *database; NSInteger *primaryKey; NSInteger *accountKey; NSInteger *categoryKey; NSString *title; BOOL hydrated; BOOL dirty; NSData *data; // Why do I need this? } The primary key will be auto generated in Sqlite and I am storing the integers, foreign k...

Large data set and AddressBook's ABAddressBookCopyArrayOfAllPeople

With the AddressBook API, the only way to get a list of all of the people seems to be via 'ABAddressBookCopyArrayOfAllPeople' if you're not using 'ABPeoplePickerNavigationController'. ABPeoplePickerNavigationController's pick a person and dismiss the view behavior is not what I need. Instead, what I'd like to do is load the address book...

How can I differentiate a Shake vs a Tilt on the iPhone

I have a page UIScrollView that will scroll 1 page left or right depending on the tilt of the phone. I would also like to implement "Shake for a random page", but cannot figure out how to do the logic for differentiating a shake motion and a x-axis tilt. Can these two motions be used in conjunction with one another? I don't need anyth...

iPhone create SQLite database at runtime?

Most sqlite examples I've found talk about creating a db file from the commandline first and then adding that to your app. For my project, I'd like to be able to create my database within the app when it starts up for the first time and then save it to a db file in the user's sandbox. Is there a way to do that? ...

Trying to get a UILabel to Show in a View, without a NIB

Hi all, I'm new to iPhone programming, and I'm trying to make a simple program without a NIB. I have worked through some NIB tutorials, but I'd like to try some things programmatically. My code loads without errors, makes the status bar black, and makes the background white. But, I don't think I'm loading my view with a label correctly...

tag for UITabBarItem

When I use the this method to initialize a UITabBarItem: - (id)initWithTitle:(NSString *)title image:(UIImage *)image tag:(NSInteger)tag Do I need to have a distinct tag for each tab bar item, or (since I don't use them) can I simply use the same tag value for all of them? ...

How to find available memory in iPhone programmatically?

I'd like to know how to find programmatically available memory in iPhone from Objective-C? ...

Help how to load UINavigationViewController from UIViewController

Hi, Here goes stupid question again :( I am trying to create a sample app that loads UIViewController when the app loads and the view contains a button to load UINavigationViewController. Now I created a project with "Window-based Application" and added "RootViewController" in the project with .m, .h, and .xib. Next I added a view and...

Can the iPhone 3.0 SDK provide full access to bluetooth devices (headsets)

So an iPhone can pair with a bluetooth headset and use it to make calls (although an iPod touch with the 3.0 OS can not pair with a headset, go figure). But can I write an app that can access paired blue-tooth devices and their functionality (like the mic input from a headset). This would be useful in VOIP apps or even multi-player ga...

Separate NSArray to a list of NSString type objects

A UIActionSheet is initalized with: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Title" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Button1", @"Button2", nil]; I am trying to pass an NSArray into the "otherButtonTitles" message. I tried to pass an NSArray using: ...

Controlling iPhone App Flow During Table View Animations

In my application I would like to be able to wait until table view animations (deleting table view rows) were complete before executing part of my application. I was wondering if there would be any way to wait or pause my application until the these animations were complete. Thanks. ...

loading a image from documents directory in iPhone

Hi All, I want to load a image to UIImageView from my app documents library. I am trying to use the following code but it is not working. UIImageView *background = [[[UIImageView alloc] initWithFrame:CGRectMake(3, 10, 48, 36)] autorelease]; [background setImage:[[UIImage imageAtPath:[[NSBundle mainBundle] pathForResource:@"Thumbnail-s...

Convert .png to PVRTC *on* the iPhone.

Is there a standard mechanism or known library that will convert .png images to compressed PVRTC textures on the iPhone itself (not during development using the standard tools on OS X). I have a number of .png textures in my application but swapping is an issue. I'd like to create PVRTC variants of the .pngs on the device, should the av...

Parsing XML in iphone Xcode

hi I am new to iphone development. I need to parse simple XML coming from my webserver and store this in database. Is there any sample code for doing the same. Please help me Thanks ...

How to check network type in iPhone app

Hi All, Last week we submitted our app to apple. Yesterday we got response from them. Basically our app plays the videos from IIS. Now we are not at all checking the network type. it is playing videos without wi-fi also. But apple is asking us to restrict it to play only with wi-fi. So now i need to check my network connection type. ca...

iphone Development

How will you test an iPhone application without the iPhone being available? ...