iphone

How do I create an iPhone application icon without the standard reflective look?

Xcode automatically resizes and applies a glossy look to images added as the application icon. However, I've seen some apps without the glossy finish. How do I disable the glossy icon look? Thanks! ...

Is there an integer vector struct in Cocoa or should I define my own?

I am keeping track of pairs of ints and NSUIntegers as array indexes and other things. Is there something analogous to CGPoint that is already defined? I'm doing graphics stuff on iPhone if it matters. ...

How do I create objective c objects directly from plist files?

Hi, Someone on IRC told me I could create objective c objects directly from plist files in such a way that I don't have to specify strings everywhere for serialization/deserialization of the plist. Does anyone know how to do this? I'd like to simply have a plist like this <array> <object> <id>my unique id</id> <description>...

Can two iphones connect over wifi without user interaction?

I'm working through an idea for an iphone app. One of the tech requirements I'm considering is the need to send a short data message to another iphone running the same application within range, but this would need to happen transparently. I don't have 2 devices to test (yet, obviously I'll need them eventually), and haven't been able to...

iphone navigation button opening a new view

I am trying to get a button on a navigation bar to load a new view, simple right? I have been unable to get it to work here is my code - (IBAction)addAction:(id)sender { NSLog(@"Button pressed"); NSString *viewController = [[addViewController alloc] initWithNibName:@"AddView" bundle:nil]; self.addViewController = viewContro...

GPS Location takes a few seconds to be retrieved

Hi all, I have written an iPhone app that uses the iPhone's relative GPS location. I have a button in the user interface that does reverse geolocation (pulls the street name bases on the lat and long). The only problem is that the location object as retrieved by CLLocation *location = [[self locationManager] location]; is nil if th...

How to change/reset iPhone simulator device ID ?

(subj) Thanks. ...

Has anyone worked out how to manually add labels into a Core-Plot (iPhone) graph?

I have a simply bar graph created for my iPhone application however I want to manually add the x-axis labels. Has anyone worked out a way to do this? I found the CPXYAxisSet.xAxis.axisLabels property however when I create an NSSet and assign it using: axisSet.xAxis.axisLabelingPolicy = CPAxisLabelingPolicyNone; NSSet *labels = [[NSSet...

[iPhone] Performance issues of grouped UITableView on Device

Hey guys, I am quite new to iPhone development but I am trying to build a small medical app. The app consists of tab bar controller and in the first item is a navigation controller and a grouped UITableView. The problem is that scrolling the table on my iPhone 3G is pretty slow. It is not so smooth like in the Settings app. The perform...

How to calculate the size of a UIFont when text in label is constrained down to fit width?

Imagine a UILabel, which is 200 pixels wide and 50 pixels high. The label has text inside, and the label makes the text smaller so that it fits into the label. But now, how would you get the size of that UIFont how it is visible in the label? Lets imagine the font size was given with huge 100, and the label squeezes it down to 15. And th...

Is calling [self release] allowed to control object lifetime?

I want to create an object in Objective C but I don't hold a reference to it. Is it allowed to let the object control its own lifetime by calling [self release]? In case you're wondering why I need this: I want to create an object that subscribes to some notifications, but after a while the object is no longer needed and should go awa...

How do i set the height of the UINavigationBar in an iphone app

Im using a typical situation with UINavigationController, id like to make the navigation bar a bit taller. setting its bounds and frame dont seem to make a difference, im using this code //set up the navigation UINavigationController *navigationController = [UINavigationController new]; [navigationController.navigationBar setBarSty...

Downloading images from a server iPhone SDK

I have created a program which allows me to upload images to my server. They are given a random file name when uploaded. I want to be able to download all the images from a folder on the server so I can display them in my application. The only example I have seen requires that I know the file name of the images which I don't. How could I...

UINavigationController and switching next-prev item within one level

Hi, could anyone help me with the next question. I am working on an app with the navigation similar to Notes app has. The problem I faced i how to implement navigation within one level and keep root view as the previous screen. So the scenario I need to achieve: 1. Drill down from the top level list to the detailed view. 2. From this d...

How to safely encode µ or the micro-symbol into an NSString programmatically?

I need a representation of µ or "micro". That funny small u with the long tail on the left side. Maybe you can see it here: µ Some weeks ago I was reading in the docs, that it's a bad idea to type any special characters into the source code. So to prevent problems, could I encode that special character µ somehow like web folks do with  ...

formatting european characters from JSON results

hi, i am building an application that imports JSON results and parses the objects to a table cell. Nothing fancy, but in my results, many of the terms/names are European with characters such as è or ú which come out as \u00E9 or \u00FA. I think these are ASCII ? or unicode? ( i can never keep em staight). Anyway, like all good NSSTring's...

How to observe managed object context

Hi, Whenever i make a change in the objects in the first tab of my application the updates are automatically upated in tab 2 becuase it uses a fetchedResultsController. Now i have a third tab that should also update itself, but how can i do that? I only have a nsmangedObjectContext in the third tab to get the appropriate data. How can ...

Outer Glow for UIView

Hi Everyone: I am wondering how I can create an outer glow effect outside a UIView on the iPhone, kind of like when clicking a regular NSTextField on the Mac. Thanks for any help! ...

Objective C: why release immediately after creating ui object

Many iPhone code samples (from Apple, etc.) include code like this: - (void)viewDidLoad { CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame]; // add the top-most parent view UIView *contentView = [[UIView alloc] initWithFrame:applicationFrame]; contentView.backgroundColor = [UIColor blackColor]; self.view = contentView;...

How do you handle memory management of outlets in the iPhone SDK

Since KVC is used to set outlets on the iPhone, there are 2 methods (that I know of) to make sure you've properly handled memory management. Specifically, I am referring to this article written by Aaron Hillegass. My question is which method do you use and what is your reasoning? Release all your outlets in dealloc and viewDidUnload ...