cocoa-touch

Multitasking aware applications in iOS 4 and Custom URL Schemes

Hello all, I'm trying to implement OAuth securely as detailed here: http://fireeagle.yahoo.net/developer/documentation/oauth_best_practice#custom-url-osx. I seem to have hit a stumbling block, as I am unable to figure out how to handle a url which launches my application when in the background. I have registered my application to handl...

iPad app navigation bar with multiple buttons on the same side

how can I have a back button and another button both on the left side of the nav bar? since this is an ipad app there's space for multiple buttons. but I can only get it to show one button per side on the navigationitem... ...

UITableView crash on updates after text edit

So I'm totally stumped by this one and tempted to call "OS bug". I have a TableView controller with a single section, and in the header for that section there is an UITextField. Several operations result in rows being added/removed without a problem. However, as soon as text is edited in the header, and the keyboard dismissed, any inser...

How to put gradient style table cell in a table?

Hey, I am making a custom table cell right now but my custom cell is just white cell with some buttons and labels in background color which looks not that great. Is there a way to render the background color so that the cell has some vertical gradient effect? For example, on top of the cell it looks white and as it gets closer to center ...

UINavigationController crashes due to a NSArray variable

I push a view controller into current navigation controller. It works fine, except when I am getting out of the current view controller, it crashes. MyTableView *newPage = [[MyTableView alloc] initWithNibName:@"table2" bundle:nil]; [[self navigationController] pushViewController:newPage animated:YES]; //[newPage release]; I comment ou...

Quartz 2d / Core Graphics: What is the right way to draw some text?

I've been at this for awhile, it seems that there's many ways to go about this in quartz 2d: 1) Draw text using core graphics methods... CGContextSelectFont CGContextSetRGBFillColor CGContextShowTextAtPoint and on and on, which is horribly low level. 2) using NSString drawAtPoint (so far the method I like) NSString* text = @"Hello"...

Internationalization and Validation

My app has a registration page for new users and I'm trying to carefully support as many languages and locales as possible. One of the rules for their desired username is that it must be alphanumeric, but when I type Japanese characters into that field it never passes validation. Do you know of any good resources on best-practices for ...

Loading all the values of an attribute of core data to an array

I have an attribute "term" which is a NSString in my core data "Event". When the table view is loaded I want all the values of "name" to be loaded to an array. I used the code - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath { Event *event = nil; event = [fetchedResultsController objectA...

Localizing Dates From Remote Server

I'm storing all dates on my server as UTC. I fetch this data to my app via JSON and am successfully parsing these dates. How should I localize the dates in Objective C? ...

Retain UIViewController or not in navigation stack

Hi, I have a scenario that I'm not sure whether to retain a view controller or not. Say I had ViewControllerOne. When a button was pressed, ViewControllerOne would push ViewControllerTwo in the navigation stack. ViewControllerTwo needs a reference to ViewControllerOne because it needs to access an ivar in that view controller. The quest...

iPhone/iPad Custom menu on selection in UIWebView

I want to modify the default options to just Copy and Highlight. I looked through the documentation for UIMenuController but still couldn't figure out. I'm new and learning. Please point me to the right path. ...

How can I display mail composer in landscape mode by using MFMailComposeViewController in cocos2d ?

hi, I am writing a game in cocos2d. I want to add MFMailComposeViewController to the scene. So, when I touch a CcLabel in the scene the mail sheet is opened. @interface EmailScene : CCScene <MFMailComposeViewControllerDelegate> { MFMailComposeViewController *picker; } -(void)displayComposerSheet; @end @implementation EmailSce...

Create a notification UI like Facebook iPhone App

What is the best way to implement this sort of notification system? (Let's say I am currently viewing a UITableViewController and I want 30 pixels from the bottom to be replaced with a nice looking notification... Thanks ...

background execution in iphone 4

As we have known that apple has come up with a feature of multitasking. So, has any body tried the multitasking code...if yes please tell me how we can execute our code in the background using the lifecycle methods like applicationDidEnterBackground... ...

Memory leak with autoreleased strings iphone

Hi, I'm trying to clean my app from leaks with Leak instrument. It shows me leaks on xml parser (TBXML). Here is a class I'm going to create upon the parsing: @interface GraphPoint : NSObject { NSString* x; NSString* y; } @property (nonatomic, copy) NSString* x; @property (nonatomic, copy) NSString* y; @end @implementation...

Cocoa memory management rule

Hi, The Cocoa "Memory Management Programming Guide" document says: You take ownership of an object if you create it using a method whose name begins with “alloc” or “new” or contains “copy” (for example, alloc, newObject, or mutableCopy), or if you send it a retain message. You are responsible for relinquishing ownership of objects y...

Iphone: UIWebView inserting images from database

Hi Im trying to fetch an image from a blob field in a database and trying to insert into a UIWebView. thus far the code is -(void)prepareHTML{ imageBlob = [fp fetchImage:storyRowID]; //*****fetches the image blob data. returns an NSData* if([imageBlob length] <= 0){//****if there is no image data fetch it from the url and update row ...

Is there any TTPickerTextField alternative? perhaps in iOS4?

Is there an alternative or new stuff in iOS4 that resembles TTPickerTextField I am looking for a way to recreate the "new mail" control view and I've read about TTPickerTextField. Three20 is my last option (especially as it has no iPad version) and I wanted to know if iOS4 gives some new UI controls to do this. ...

iPhone - subview stacking slowing down application?

Hi, As title says, I'm wondering if stacking subviews can slow down an iPhone application. For example, I have a UIViewController, which has a view occupying the whole screen. When the user presses a button, I create a second view controller and add its view as a subview of the original VC, making the second view completely hide the fi...

Iphone application: Managing downloaded images

Hi I am currently trying to building a reader app for the iphone, a bit like NYTimes iphone app or Time magazine or USA today iphone app. Basically I'll be parsing a feed containing articles, saving the data locally in a database and displaying stuff and all that. Now I am just starting off with Iphone app development, I would just like...