iphone

Are there tutorials or videos about how to use Instruments to find memory leaks?

I have found some big memory leaks with instruments but have no idea how to figure out where in my code they are. Need some tuts on how to go about that.... ...

What would cause a Cocos2d iPhone font to only showing 2/3rds of the letter/number?

I am trying to use this font in a cocos2d iPhone game. The font only shows 2/3rds of the letter/number. If I open the text editor installed with OS X and use the font, the letters appear fine. Any ideas to what may be wrong? Here's the code snippet showing how I display a string using the font: CCLabel* number = [CCLabel labelW...

UITableview: How to Disable Selection for Some Rows but Not Others

I am new to iPhone development. I am displaying in a group tableview contents parsed from XML.I want to disable the click event on it (I should not be able to click it at all.) The table contains two groups. I want to disable selection for the first group only but not the second group. Clicking the first row of second group navigates to ...

GDB launches after iPhone OS App

Hello guys, Strangest thing happening to me right now: GDB seems to launch after the app does. Output in xcode terminal window looks like this: [Session started at 2010-02-15 18:57:31 +0100.] 2010-02-15 18:57:35.822 CPPlayer[2890:207] CPLanguageManager.m:26 Initializing LanguageManager 2010-02-15 18:57:35.825 CPPlayer[2890:207] CPLang...

Interface Builder Lock Item Positions?

When working with UI items in Interface builder is there anyway to lock an items position once you are happy with its placement? I only ask as I keep slightly dragging items when selecting them for edits resulting in having to go back and tweak positions. gary ...

How view data stored in Core Data?

I'm creating a Core Data model for my application. I would like to be able to look inside it to see what I have stored in there. Is there an easier way than searching for the backing store (mine should be SQLite) and reading it from there? Doesn't seem very Apple-esque. ...

kABPersonFirstNameProperty... trowing EXC_BAD_ACCESS

Im reading the address book contacts... everything goes well until I test a contact with no First Name ( Since I can create a contact with just an email or a phone or wathever....). The code (reduced) is this: - (NSMutableArray *) getContactsInfo { NSMutableArray *contactsList = [[NSMutableArray alloc] init]; localAddressBook =...

Why's the Build and Analyze command not finding obvious memory management errors?

For some reason, the Clang Static Analyzer in my Xcode doesn't complain about anything. I made big memory management mistakes to try it (alloc and no release), but it never finds them and doesn't complain about them. Even after clean all targets and again Build and Analyze. I was building for Simulator 3.1 Must I set that up specifical...

How do I get a tableview to dynamically display information that was just selected from another tableview?

I am working on an app that displays a schedule. I have no problem displaying the lists of items. My question relates to displaying information on a new tableview that relates to the selection from the last tableview. All while not having to make several hundred tableviews (big list of info). So in short how do I tell iPhone to remem...

Why is this code producing an memory leak?

The Leaks Instrument in Xcode shows me an memory leak here. I have commented the affected line which Leaks is complaining about. But I see no error in my memory management... - (void)setupViewController { MyViewController *myVC = [[MyViewController alloc] init]; UITabBarItem *tbi = [[UITabBarItem alloc] initWithTabBarSystemItem...

Variable args in an iPhone ObjC function

I must be stuck on stoopid today because I spent over an hour trying to understand how to make variable args work in this iPhone project I'm working on. Could somebody help me get a green bar in the below unit test? Where am I going wrong? #import <SenTestingKit/SenTestingKit.h> @interface VAArgsTest : SenTestCase { } @end NSString*...

Alternatives to iframe for loading cross-site HTML when using iPhone?

I apologize if this has been asked before. I searched but did not find anything. It is a well-known limitation of AJAX requests (such as jQuery $.get) that they have to be within the same domain for security reasons. And it is a well-known workaround for this problem to use iframes to pull down some arbitrary HTML from another website...

What is the best way to think about the order of programming?

Possible Duplicate: How to Think in OO I am sort of new to programming. I am working with Objective-C and iPhone app Dev. I am having some trouble wrapping my mind around the OOP mindset. Does anyone have any tips or tricks to think or visualize the programming process before you sit down and start it? ...

UINavigationController popViewControllerAnimated: not getting called correctly

So basically I have a hierarchy with a navigation controller inside of a navigation controller. I'm trying to use popViewControllerAnimated to notify the top NavigationController to close the bottom so I created a dummary base ViewController that sits at the bottom of the stack and I monitor popViewControllerAnimated: and send a notifica...

Trash can icon animation?

Hi, I'm new here and I just had a question about animating the trash can icon in an iPhone application like in the photo and mail app. I tried using the method here to animate the trash icon in a UINavigationController's toolbar, but it didn't seem to do anything. Can anyone post a code sample of how to use this method correctly? Thanks...

FB Connect With iPhone issue

Hi guys! I have to integrate FaceBook connect with the iPhone App. I downloaded SDK, added new app on the facebook. But I have one problem. I can't found how can I create templateBundleId in the console - http://developers.facebook.com/tools.php Console contains API Test Console, FBML Test Console and Facebook Connect Playground only....

Network Time Protocol for iPhone

I am writing an application that requires accurate timing. After asking this question, I have decided to investigate using NTP or maybe Simple NTP. Is there any open source implementation of these protocols for the iPhone? So far I have managed to find a broken link. I am also aware that NTP has a C reference implementation, so I am try...

UITableView Background Image

Hi, I am trying to set up a table view with a background that scrolls. The background is a repeating cloud image. As a preliminary attempt to implement this, I have used the following code: - (void)viewDidLoad { aTableView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @"cloud.jpg"]]; aTableView.separa...

Make UISearchBar first responder when View Loads

I have a simple UIViewController and a UISearchBar, when the view loads I want to have the search bar become the first responder right away so that the keyboard is showing and they can start typing their query right away. I tried doing it in viewWillAppear like below without any luck: - (void)viewWillAppear:(BOOL)animated { [product...

How do I call a method from an imported class in Objective C?

Hi all, I have some code which fetches an XML file from a URL and then parses it using NSXMLParser. Currently this code is contained within the viewController which calls it. I would like, for re-usability sake, to move the parsing code to an external class and call it from the viewController. I tried to achieve this as follows: Crea...