iphone

Obtaining iTunes ID to an iPod player item

I have an app that interacts with both the iPod player, and the iTunes Store Web Service Search API. Is there a way to obtain the iTunes ID for a song that I retrieve from my user's iPod library (e.g. via MPMusicPlayerController, or MPMediaItem)? The documentation says that the MPMediaItemPropertyPersistentID is a unique identifier tha...

Calling presentModalViewController twice?

I have an issue with UIViewController#presentModalViewController being called twice. I have a modal view, and I trying to bring up another modal view, but the second time nothing happens. I suspect it's hidden? Anyone else ever do this? ...

iphone OCMockObject and unit-testing a class that inherits from NSURLConnection

I want to unit test the custom init method of a class that inherits from NSURLConnection -- how would I do this if the init of my testable class invokes NSURLConnection's initWithRequest? I'm using OCMock and normally, I can mock objects that are contained within my test class. For this inheritance scenario, what's the best approach to ...

self.navigationController is nil after adding subview

here is my productscontroller.h ProductListViewController *productListViewController; ProductGridViewController *productGridViewController; UIButton *flipIndicatorButton; and i am adding list and gridview as a subview like this in my implementation ProductListViewController *listController = [[ProductListViewController alloc] init...

iPhone SDK - Leak when viewing PPT file

I use UIWebView to display many type of file on iPhone. Everything look good except with a PowerPoint file. After the PPT is displayed, there are many Leaks are shown. When I clicked on 1 of leaks, I got this: Responsible Library: Foundation and Responsible Caller: -[NSCFString appendFormat:] Does anyone met this problem befor...

NSMutableDictionary key values

is it true that the key values for NSMutableDictionary can only be strings? I was trying to use objects, but I am getting a warning. ...

How to Handle an Indefinite Amount of TableViews in an iPhone drill-down app

I've Created a UITableViewController subclass. Do I only need one controller? Do I just instantiate multiple instances of that one subclass? The iPhone App I'm building will start with a Table of a list of people. If the user taps a person, a new table will be pushed in with a list of Companies they've worked for. If the user then ta...

access files in documents folder of application of iphone

HEllo, I have a situation here, I have an app , in this app I save some files to documents folder. Now I want to export these files or view these files from mac. Suggest some way for this. Thanx in advance ...

How to implement pedometer in iphone?

I have implemented one application in which i want to implement pedometer functionality.Is it possible to implement pedometer?Please give me idea. ...

iPhone Shake event not properly working

I have this inside my viewController: - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event { if (event.type == UIEventSubtypeMotionShake) { NSLog(@"I have shaked"); } } Why is this not working? Edit: I do infact have this: - (void) viewWillAppear:(BOOL)animated { [shakeView becomeFirstRespond...

memory management: should I release if a Copy method returns empty?

I call ABAddressBookCopyPeopleWithName(book, fullname); which is supposed to return an array of ABRecords for all the names that match 'fullname' from the AddressBook. Since this has a 'Copy' in it's name, it's returning with a retain count of 1 which I should release. What if it couldn't find any matching names? Should I still release ...

Drawing a line between one CGPoint and another.

I have 2 CGPoints and a would like to draw straight line between them, how would I do this? ...

Upgrade beta OS on iPod Touch?

My iPod has the Beta OS 3.0 and I can't find any way to upgrade it to 3.1. ITunes says is up to date, XCode doesn't offer any upgrade options. Am I missing something? ...

How to place my application's Settings in iPhone's "Settings" screen

I'm a beginner! I want to place my application's settings in the iPhone's "Settings" screen, please help me! ...

UIActivityIndicator not showing up

I have implemented a UIActivityIndicator that shows up in one part of my program but not another. I have the activity indicator come up while i am loading a table, however, i am trying to get it to start animating again after the user has clicked a button and is waiting for the table to reload. The table reloads, but no indicator. Here i...

How to make iPhone OpenGL ES context update straight away?

I have an OpenGL ES application for the iPhone I am developing, being a port of a 2d-oriented application from another platform. I have chosen to render the graphics using OpenGL ES for performance reasons. However, the main application runs on a separate thread (due to the original application design), so from within my app delegate I d...

pathForResource? without using extension (Iphone)

Hi, Here is what I'm doing, when I create an image with the path in the bundle: UIImage *image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"jpg"]]; What I want to do is trying to find the path for my image but without using the extension, without using 'ofType' (because the name of my i...

Location Based Application for iphone

I want to create an application which retrieves the latitude and longitude value of the current position of the iphone, give those values to some 3rd party server and gets details about that place, if possible show a map of that area on an imageview. I've done for the part of getting the locale information, ie to get the latitude and lo...

UITableView Lazy Image Load, images appear after table STOPS scrolling..

I implemented lazy image load for my UITableView using NSUrlConnection. This is all working very nicely. When I open my table, I automatically get the images when I wait for a second (on 3G). However, when I scroll, the table loads the new cell's, starts the NSURLConnections, but when the image is finished loading (in code), they do not ...

dataDetectorTypes phone link issue

Hello, this is a reformulation of this question When i set myWebView.dataDetectorTypes = UIDataDetectorTypeNone; phone links (in a href html tag) are handled like this : How can I handle phone links with the shouldStartLoadWithRequest delegate method instead? ...