iphone

UINavigationBar Touch

I would like to fire an event on touch when a user taps the title of the navigation bar of one of my views. I'm at a bit of a loss on whether I can access the view of the title of the UINavigationBar in order to wire up a touch event to it. Is this even possible? ...

Iphone load XIB/m/h Problem

Hello, why does this not work: - (void)viewDidLoad { Login *neu =[[Login alloc] initWithNibName:nil bundle:nil]; [self presentModalViewController:neu animated:NO]; } but this works -(IBAction)dologin:(id)sender{ Login *neu =[[Login alloc] initWithNibName:nil bundle:nil]; [self presentModalViewController:neu animated:NO]; } ...

What is the best way of solving memory leaks on the iphone ?

Please suggest the best way of solving memory leaks on the iphone. What is the best use of release, autorelease, retain and which cases do each apply? ...

MGTwitterEngine - efficient way to get and cache profile imags

What is the most efficient way to get and cache a profile image for a user using MGTwitter? Our problem currently is that there must be a call to getUserInformationFor to get the url of the image, then getImageAtURL resulting in two calls to the server. Currently, we just need the image information, so its redundant to have to download ...

Autocomplete search example for iPhone

Can someone point me in the direction of how to implement an "autocomplete" search interface on the iPhone. I am assuming I will need to use a NSTimer to periodically check what has been typed and then submit that partial string to my data source and then display those. I need to connect it up with an existing web service returning JSON...

Flexible way to pass references in Objective-C (iPhone)?

What is a good way to get a reference to "singleton" objects in Objective-C? Note, specifically, I am not referring to the singleton pattern, I am referring to objects of which there are normally only one instance. This specifically applies to application models. For example, in a cooking app, I would like a class (RecipeModel) that can ...

Reorder a tableview and save it to a plist

Hi I have a plist with some fixed data, for example orange apple banana I want to populate a tableview with this data, and the users reorder the table view, and then save the plist with the new order. Which is the best way to do this? Any tutorial that show how to do? A lot of thanks ...

How to save Data in text file when user chooses a button

I want to have user select between two different buttons on a view, If the the user selects the imageOne, a label is created called "imageOne", then I'll save the label into an array using the following technique: - (IBAction)saveData { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)...

How to clip a CAShapeLayer ?

I have a CAShapeLayer that i add a CAGradientLayer to, but there is no clipping about the shape of the CAShapeLayer. ...

iPhone - Program Received Signal : 0 - on device but not on simulator

Hi, I'm sure this is memory related but I can't seem to figure out what variable is causing me problems. I'm releasing everything I allocate as far as I can tell. This loop seems to work fine if it runs 365 times but not 730 (its doing days in a year). Here is the snippet of code that is failing.. it never gets out of the loop when th...

Is there a japanese kana font on the iphone by default?

I was wondering if there is a built-in font for Japanese kana in the iPhone OS? I was wanting to display kana characters and figured it would be easier to generate them in a UILabel as text versus creating a .PNG and display them in a UIImageView. I would want this to be available to non-Japanese iPhones/iPods. I'm not 100% aware if...

iPhone Memory Management

Hi all, I'm working on an app and I'd like to make sure that I'm managing memory properly and releasing everything that I should. In my viewDidLoad method I allocate some variables in determining which background to apply to the view (for internationalization) and the app works fine if I don't release them. The problem is that if I re...

How to add an option to the popup actionsheet of iphone safari ?

I am using UIWebview in my app, when tap and hold on a link for a second an actionsheet pops up with some options OPEN, COPY and Cancel. How to add a custom option to the actionsheet ? ...

When would I want to use NSPropertyMapping?

Does it have to do with mapping between different data models? To which other Core Data classes is this related? It doesn't look too obvious to me where this belongs to. Merging data models? Or is that just a stand-alone thing? When would I use NSPropertyMapping for example? ...

How to keep an NSArray available to all methods when programming for the iPhone.

Hello. I am making an iPhone app that uses a few NSArrays. Right now I have to generate the arrays in each method. I know there has to be an more efficient way of doing this, like having the NSArrays created during initialization and then being available to all methods after that. The problem is, that when I create the NSArrays in th...

How to set highlighted image in Segmented Control in iphone

Hi there I am using a segmented control in my app. I am also setting segmented controls setImage property to set an image for each segment of the control. I am not sure how to set an Image for its UIControlStateSelected state. I mean I would like to set an image for my segmented controls selected state. Please let me know how do I do tha...

Need approach to show tables using segmented control?

Hi there I using a segmented control on a view. With the help of this segmented control I would like to display to different tables on my view, Suppose I have two segments in my table on tap of segment 1 I would like to display table 1 and on tap of segment 2 I would like to display table 2 my table 1 is a Plain table and table 2 is a gr...

How is the process called when getting persistent objects out of the persistent store?

"fetching ... " ... fetching what? Persistent objects? What's the scientific term when I send a request to an persistent store to get back an managed object? ...

Why I am seeing my opengl es like this?

Seem like I'm not clearing the image correctly or something. On the other hand the view takes to much to render using the cos function. I appreciate if you can guide me to optmize the code with best practices. Thanks And I would like to share with you this link: http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-tabl...

Auto rotate custom drawn view on iPhone

I have a UITableView full of custom draw cells. When the view rotates, it just stretches all my custom drawing. How can I get my views to redraw themselves when the view rotates? ...