iphone

Some beginner Objective-C/iPhone questions

I'm just starting out (reading up a lot for the past couple of days). Here's some questions that I have stacked up, hopefully someone can answer them. 1. the (self != nil) check in initializer code. Why do it? To prevent accidental access to some "run-only-once" code that's wrapped up in there? Where from could this accidental access co...

reload uitableviewcontroller on iPhone

I'm trying to load a uitableviewcontroller after a location is found. This also means after the viewdidload method. my class is extending a uitableview controller with this interface: @interface RootViewController : UITableViewController { in the implementation I try to do a reload of the table view with: [s...

Is it possible to set the position of an UIImageView's image?

I have an UIImageView that displays an bigger image. It appears to be centered, but I would like to move that image inside that UIImageView. I looked at the MoveMe sample from Apple, but I couldn't figure out how they do it. It seems that they don't even have an UIImageView for that. Any ideas? ...

iPhone app launching tips?

I just finished my first iPhone app. It's a little game and I want to launch it for 99 cents. So my concerns is, how long usually does an app stay on the new released list. ALso, is there any launching tips on timing etc? Thank you ...

Where can I go for hands-on cocoa training besides WWDC?

I'm banging my head up against Cocoa and Xcode, and have been for months. I never seem to be able to get away from the tutorials, which are often incomplete, or Apple developer documentation, which is sparse on samples. I've watched videos, downloaded source code and asked developers for help. I still feel like I haven't gotten that audi...

What is the best way to draw this ellipse in an iPhone app?

I'd like to have a similar ellipse as the Mail app in my iPhone app. A screenshot just for reference is here: http://dl-client.getdropbox.com/u/57676/screenshots/ellipse.png Ultimately I'd like the ellipse with a numerical value centered in it. Is it best to use a UIImage for this task? Perhaps less overhead to draw it with Quartz? If i...

Iphone-SDK "unable to read symbols error" when linking to IBOutlet in tab based app

I built a very simple tab based app with 2 tabs, each tab tied to its own view controller. Straightforward so far. I then create a simple IBOutlet on my 2nd view controller like so #import <UIKit/UIKit.h> @interface bViewController : UIViewController { IBOutlet UITextField *aField; } @property (nonatomic, retain) UITextField ...

XCode and iPhone Compiler Warning

I am a long time Microsoft developer and I am new to iPhone development using XCode. So, I am reading a book and going through examples trying to teach myself how to write an iPhone application using Objective-C. All has been good so far, however, once in a while I run into the generic 'objc_exception_throw' message at runtime. When t...

What's the best way to organize multiple subviews?

As someone who is fairly new to iPhone development, I've been trying to find good design patterns for managing multiple subviews, specifically where the subviews need the same type of delegate methods to be defined. For example, I have a view where I need to swap between 2 UITableViews based on user actions. Both UITableViews need a UIT...

iPhone development forum recommendations

What good iPhone development forums do you recommend? (beyond Stack Overflow..) ...

Alternative to NSXMLDocument on the iPhone for XSLT purposes...

I know it's been asked before (like here), but is there way to natively use XSLT on the iPhone? If not, and I need to use libxslt, is there any documentation/tutorial of how to use it on the iPhone? EDIT: I've decided to use libxslt. What files are necessary to include? I haven't found any tutorials of examples of use on the iPhone, and...

Set of Images: Is it better to store it in SQLite or hard-coded in a Collection?

I have 5 background images for my app. I want that the user can select one. I am looking for the best way to hold them in my app, so that my app is able to loop over them and show them to the user as he clicks "next image". Any ideas? ...

EXC_BAD_ACCESS in UITableViewController

I'm trying to use a UITableViewController (delegate & dataSource for the view) to display a simple table read from a Plist. The Plist contains a NSDictionary which itself contains several NSDictionary objects that represent objects used in my application. The rest of the code looks something like this (simplified): - (void)viewDidLoad ...

Unable to update UITableView

I have UITableViewController as the RootViewController. I need to add rows to the table depending on data I get from another thread which I initiate from the RootViewController's thread. When I retun back from other thread to my RootViewController's thread I have the updated data, But I can't update the TableView. I called the [self.tabl...

NSDictionary or NSObject with NSStrings as properties, Which is Better?

Which is better approach between use of NSDictionary and NSObject with NSStrings as properties, in terms of faster performance and efficient memory management, if the code is written for an iPhone application? E.g. If an application deals with parsing an XML file which is as follows: < ?xml version="1.0" encoding="utf-8" ?> < FirstNa...

How to find Angle of Rotation of iphone?

Hi to all I want to calculate angle of rotation when I am rotating the iphone from portrait mode to Landscape right or Landscape left but in YX plane. In my game I want to rotate one object respect to iphone but in opposite direction. If I will move iphone from portrait mode to Landscape right by 30 degree then I want to move object 30 ...

iPhone Drop Down Box in a UIWebView

Hi all, i am using a select tag in a UIWebView in my application but facing with some problems. (maybe they are not the problems but i m soo new for iphone programming) when the select box is clicked a UIPickerView opens, is there any way to disable it? when the select box is clicked it gets lost and when i click to its place again it...

Replace multiple characters in a string in Objective-C?

In PHP I can do this: $new = str_replace(array('/', ':', '.'), '', $new); ...to replace all instances of the characters / : . with a blank string (to remove them) Can I do this easily in Objective-C? Or do I have to roll my own? Currently I am doing multiple calls to stringByReplacingOccurrencesOfString: strNew = [strNew stringByRe...

Playing sound samples on the iPhone

Hi, I've reached the point where i want to play some samples in my game/app. My instinct says use openAL ... I will have the situation where I will need to play multiple samples at once (however no more than 2 or 3) and the samples will be short (2 or 3 seconds). My question is what is the best way of playing samples on the iPhone give...

How do I render my scene as a mask in OpenGL?

Hello, I've got an EAGLContext drawing into a CAEAGLLayer (via the standard GLGravityView example in the iPhone SDK). What I'm trying to do is place my view on top of another view and use what I render in OpenGL to mask the underlying view. Let's say the bottom view is a picture of a flower and I put my OpenGL view on top and I set th...