iphone

How to make sure the UIView -drawRect: is drawing with contentScaleFactor of 1.0f?

I've implemented -drawRect: to draw something, and I don't want that this drawing happens on a larger bitmap on the retina display. How can I make sure that this bitmap is always exactly the same across all devices? I tried to set self.contentScaleFactor = 1.0f; in the initialzier but that didn't help. The system seems to change this ba...

iOS 4 Alarm Clock App with Multitasking Support

I'm making an alarm clock app with multitasking support. However, I'm stuck with some limitations of the sdk. I need to play selected alarm sound whenever the alarm time comes with some properties set by the user. These properties: - Alarm sound can be a music from the user's iPod library, and also some sound files in application bun...

iPhone - NSNumberFormatter problem

I am using NSNumberFormatter to create a currency formatted string. Everything works fine on most devices, but on some devices for example devices with Korean language, the $ sign shows up as a rectangle. NSNumberFormatter *currencyStyle = [[NSNumberFormatter alloc] init]; [currencyStyle setFormatterBehavior:NSNumberFormatterBehavior10_...

how to resolve this error"An error occurred while trying to authenticate the package: 397613980.itmsp"? I am getting when loading my application

I have no idea why I am getting this error while adding my iPhone application with application loader: An error occurred while trying to authenticate the package: 397613980.itmsp An exception has occurred:javax/servlet/ServletContext Could not connect to apple's web service I have no idea what this errors are about? n what the hack j...

UITableViewController crash on delete row because cell is drawing and accessing core-data

Hello, I have a UITableViewController backed by a NSFetchedResultsController. I'm currently experiencing a SIGABRT when deleting a row, after I save the managedObjectContext in commitEditingStyle. The crash then happens in drawRect: in my UITableViewCell where it tries to access the core-data object for this row: [self.document.name...

How to get all entries of a NSFetchedResultsController/NSManagedObjectContext ?

Hi I have a nice working iphone app that works with core data. I use a NSFetchedResultsController/NSManagedObjectContext as described in various tutorials. Now I want to extends my app and add some more features. The problem I need to build up an array with objects that have informations from my data. I somehow need to get a list of a...

Code works in sim, but only sometimes on device, [Solved]

The code to set image to imageView is: - (void)setSelected:(BOOL)selected animated:(BOOL)animated { SDWebImageManager *manager = [SDWebImageManager sharedManager]; UIImage *cachedImage = [manager imageWithURL:_url]; if (cachedImage) { _imageView.image = cachedImage; [spinner stopAnimating]; } els...

Adobe Flash CS5 and iPod Touch/iPhone

As you may all know (if not, click here), Apple has finally decided to allow apps created using Adobe Flash CS5's iPod Packager on the store. Owning a PC and not a Mac, this is great news for me as I longed to give a crack to iPod development. I did try to use a fake certificate (yes I admit it) to publish an app and test it on my brot...

How can I use iOS's standard red number badges within my app?

Hi guys, I know that it's trivial to add a red number badge to an app's icon on the home screen. What's the best way to get a badge that looks like this within my app? There are some classes I've found online that can do this, such as MKNumberBadgeView, but none that I've found look completely right. Facebook, for example, implements re...

Show a modalViewController after image picking.

Hi, I want to present a modalViewController(do some picture drawing) right after dismiss the imagePickerController(exactly after finish image picking). I've tried to set up a IBAction with a bar button and it works fine when I tap it. But what I want is present the modalViewController as soon as I finish the image picking Here is my cod...

How to add a NavigationViewController to a project created using the ViewController Template

I have created a new application using the View Based Application Template in xCode. My first view, which displays on loading the app, is a button based menu. One of the buttons (Make) should load a new navigation stack using a NavigationViewController. There are other buttons that when implemented will do other things outside of Navig...

Core Data: sorting by count in a to-many relationship

I am currently trying to setup a NSFetchedResultsController that will order my table view based on the number of entities in a to-many relationship. I am not sure if this makes a difference when counting, but this is also an inverse relationship. I thought something like this would work just fine: NSEntityDescription *entity = [NSEntit...

iAd works on simulator but not on device

I am updating an app with iAd. The current version has iAd, and everything works great. But the changes have been substantial enough that I want to test the ads again before I submit the update. When I test iAd on the simulator, I get the test advertisement with no problem. When I try to test it on the device, all I get are calls to ...

Where can I find the missing MediaPlayer.Framework and MessageUI.framework frameworks?

I'm attempting to ad AdMob to an iPhone app as a backup for iAd, unfortunately, I can't follow the documentation. It's telling me to add the 'MediaPlayer' and 'MessageUI' frameworks, but they don't appear to be present -- I can add a number of other frameworks, but those two are AWOL. Please note that I can add any number of other fram...

what is the 'en' under those XIB files in XCode ?

Hi, I'm looking at a sample code from Apple; named 'iPhoneCoreDataRecipes' and found those 'en' files under DetailHeaderView.xib, RecipeAddView.xib and InstructionsView.xib. Wondering what are they and their purpose. Why just make one DetailHeaderView.xib file without the 'en' file? please find the capture screen shot from the link be...

auto text messaging syncing

What I want this App to be able to do, is to be able to allow the individual copy all the text messages on his/ her phone and then send them to their profile on the website that I am creating. Is this possible ? ...

How to Change UIButton title ?

MyViewController has one UIButton and another MainViewController use MyViewController. but MainViewController can't change UIButton title in MyViewController. also, in MyViewController only change UIButton title in viewDidLoad method. What's wrong? MyViewController @interface MyViewcontroller : UIViewController { IBOutlet UIBu...

app icon for retina device

My app's icon is named: appicon57x57.png This works great on simulator and device. I don't have a retina device to test on. But if I make a 114x114 version of my app icon and call it: [email protected] and put in in the same place as the other icon, will it show on the retina devices? ...

Changing number of different UITableViewCells with particular order like Calendar app

Hi there, Sorry for the long title. In essence, I want to accomplish the same thing that the Calendar app does for Event details. The first cell shows the title and date of the event. The second shows an alert, if there is one, otherwise Notes, if there are any, or nothing else if none of these fields is present. The way I am doing it ...

XIB files vs. defining layout in code in iPhone

Aside from the WYSIWYG editor, what are the advantages of using XIB/NIB files over defining the layout in code in iPhone/iPad/iOS? While I don't find XIB files much useful, many iOS developers do, which makes me suspect I might not know their benefits or how to use them properly. ...