iphone

Using MKAnnotationView without MKMapView?

I'm wondering if it's possible to use the MKAnnotationView inside a UIView other than MKMapView? I'm trying to find an alternative to using the undocumented UICalloutView class. I can create the MKAnnotationView and add it to my view, but I can't get it to show. ...

iphone sdk: I have a Quartz Drawing problem

Hi guys, I have a view (MKMapView) and on it I've a transparent view on which I draw different things. Now I would like to give the user the option to erase things so that the "background view" (the mapView) will be seen in the erased places. Do you think it's possible? Thanks ...

Which technology to use for playing audio on the iPhone?

I need something that is capable of: playing audio files (whatever preferred format, I'm flexible) play more than one at once (=mixing it automatically to the headphones/speaker) and if possible: - play from a particular position of an audio file, i.e. starting at 2 seconds rather than from the beginning where should I have a look a...

Drawing UIImage at multiple locations in UIImageView

I'm kind of lost in between UIImage, UIImageView, CG, layers... I want to draw the same UIImage multiple times in the same UIImageView. I don't want to have a separate subview for each of those objects. It's enough to have a flat image. How do I do that? ...

Problem creating checklist (similar to TouchCells sample code) app for iPhone. Random cells get checked.

I've been having a problem creating a checklist in the style of the TouchCells example from the Apple sample code. Basically, it is a table that allows multiple selection of its items and gives each selected item a check mark. The problem I'm having is that when I select an item and then scroll down the screen, another item (off the scr...

How to link a framework for iPhone development using XCode?

I'm new to iPhone development and Xcode, so this might be really obvious. I have the exact same problem as referenced on this forum post I've created a simple list application, starting out with a custom datasource class that simply returns a hard-wired list of data. With that working, I'm now attempting to alter my dataso...

UITableViewCells not highlighting on touch

I'm subclassing UITableViewCell and adding two subviews (image, UILabel). When the row is touched. There's no cell highlighting indicating the cell was selected. I'm pretty sure I missed something, not sure how to handle highlighting for subclassed cell. Any help would be appreciated. Thanks. ...

How can I have my iPhone app start with a specific screen showing?

I have a big app with lots of screens, all arranged in a hierarchy, with a UITabBarController at the top, UINavigationControllers below that, and then UIView Controllers below those, maybe with a modal controller somewhere thrown in for good measure. The user is allowed to pick a start screen from a list. Once selected, next time the ap...

setPropertiesToFetch doesn't work as expected

I want a list of unique contacts that I've stored with core data. NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"Post" inManagedObjectContext:[self managedObjectContext]]; NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; [request setEntity:entityDescription]; ...

Is there a limit to the number of applications I can submit to the app store?

Does anyone know if there is a limit to the number of applications I can submit to the app store? I'd like to generate several applications (possibly climbing to 100 if it is wildly successful) all built from the same framework, but of interest to different groups. Thanks. ...

CFReadStreamRead blocks on the last read

Hi, I'm having trouble with a CFReadStream operation that seems to block for an extrodinarily long time after the last read. I can't seem to see anything wrong with my logic. I connect my readstream to a socket using the CFStreamCreatePairWithSocketToCFHost function. I'm sending a standard HTTP GET request over port 80 using a write str...

Drag and Drop in MobileSafari?

Is it possible to allow users to drag and drop items in mobile safari? Google images on the iPhone does something similar, but I'm not sure if it is true drag and drop or some other work around. Anyone have any insights? ...

UIWebView resizes text after rotating: looking for explanation for magical bug or my stupidity

Hello, all, so I have UIWebView in my application and I load some html (article) to it, put some CSS to make everything nicer. That's simple and clear and everything is perfect until I try to add reading in landscape functionality and then I've noticed that UIWebView ignores any css "font-size" I've put in HTML and increases font size d...

UINavigationBar background image via drawRect - issue with prompt animation

I'm adding a custom background image to my UINavigationBar by overriding the drawRect via a category. - ( void )drawRect:( CGRect )rect{ [[UIImage imageNamed:@"navbar.png"] drawInRect:CGRectMake( 0, self.frame.size.height-44, self.frame.size.width, 44 )]; } This solution seems to work fine, until you try to make use of navigatio...

iPhone Turn off GPS with Objective-C

Does anyone know how to turn off iPhone's GPS programmatically? Once I use the CLLocationManager to get three reads of my location I stop updating location as in the code below: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { if((ne...

How do I create many temporary objects and then save only one using Core Data?

I am working on an application that will perform a search against an online service and generate many Result objects. A Result object is an NSManagedObject, initialized as required by associating it with an NSManagedObjectContext. Users should be able to select a "Result" and save it as a "Favorite". In the application this is as simple...

No iPhoneOS target in xcode

I am a member of the iPhone developer program. I've created my development certificate and provisioning profile. I've installed both. However, when I create an empty new xcode project the Target Destination only lists 'Simulator - 3.1.2 | Debug'. For 'Active Architecture', only i386 is listed. However, in the project settings, Architect...

Delegating UIScrollView doesn't work - help needed!

Hi, I'm seriously losing my hair because of simple task which turned to hell. So I have UIScrollView subclass - MyScrollView and UIViewController subclass StoryViewController using that scroll view. I need to know when scroll is scrolled so what do I do? I try to delegate! // StoryViewController.h @interface StoryViewController : UIVie...

NSDictionary keys sorted by value numerically?

I store names as keys and scores as values into an NSDictionary for saving in NSUserDefaults. I then want to get back the keys sorted by score, but I can't seem to sort them numerically, only by string. The result of 100, 50, 300, 200, 500 for example would be 100, 200, 300, 50, 500 Can this be done or do I need to go about this diffe...

iPhone: UINavigationBar with buttons - adjust the height

Hi developers, I am working on an iPhone application which works in both orientations: portrait and landscape. I am using for one view and tableview embedded in an UINavigationController. The height of this navigationbar with its buttons is either: 44px portrait or 34px landscape. Within a different view I created the UINavigationBar...