iphone

correct indexPath.row selection in TableView which has multiple sections?

hi, i am having tableview with multiple sections .each section is having different no of rows. when i select in particular row in particular section, how can i find correct indexPath.row ?any tutorial? ...

Double entry in table view

I seem to have the same problem than here: http://stackoverflow.com/questions/1787704/how-to-avoid-data-lose-when-uiimagepickercontroller-unloads-my-controller I have the same issue, but it's a UITableViewController. I use Core Data and NSFetchedResultsController, using the -controllerWillChangeContent, -controller:didChangeSection:atIn...

How to handle '&' in URL sent as HTML from iPhone Mail.app

Apologies if this has been answered already. There are similar topics but none that I could find pertaining to Cocoa & NSStrings... I'm constructing a clickable URL to embed in an HTML email to be sent via the MFMailComposeViewController on the iPhone. i create the url then use stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncod...

Memory Management in Objective-C when dealing with NSMutableArray

Hi Guys , In Instruments the tempPlayer object is showing a leak. In this code, in every for loop I keep on allocating a new tempPlayer instance, set its playerCode variable with a string and add it to an NSMutableArray in each iteration. Instruments shows me a leak in the alloc statement. Is there any way to prevent tat leak in the tem...

Proper way to setup a UISegmentedControll on UINavigationController UINavigationBar all inside UITabBarController

The title pretty much describes it all. The problem being the handling of the UISegmentedControll callbacks (button presses). If the content type of all of the nested views was the same (i.e. some UITableViewControllers) then I could just switch dataSource'es and reload the tables. However this is not the case, I have 3 very differen...

iphone - programatically call navigation controller back button

hi guys in my navigation control based iphone app, in a method I would like the programmatic equivalent of the back button being pressed and going back a view. i.e. automatically press the Jobs button as seen here: Is there a generic iphone call i can make, or is more information required? Regards ...

iPhone app alert without push notification?

How can I alert a user that they need to do something without using a push notification? For instance, if I have an alarm clock app, how can I get it to ring when it is not already running without using a push notification? ...

iPhone modal view inside another modal view?

My App uses a modal view when users add a new foo. The user selects a foo type using this modal view. Depending on what type is selected, the user needs to be asked for more information. I'd like to use another modal view to ask for this extra information. I've tried to create the new modal view like the first one (which works great) an...

iphone and bluetooth device

could i connect my nokia phone to iphone using the following Object..? 1)GKPeerPickerController 2)GKSession i mean (GameKit) note that here not two iPhone but it is one iPhone other one is only one Bluetooth device.. thanks and regards jalju ...

UIWindows or UIViews

I need three different sections in my app: a login screen, a main screen, and one that takes place in landscape mode, all totally different. I saw Apple insists that an app should have one window, so I'm asking: what would be best to use for this? Three big windows, or views? And how should the hierarchy look like? I don't have experienc...

Determine if current local time is between two times (ignoring the date portion)

Considering that there is no NSTime in Cocoa-Touch (Objective-C on iPhone), and given two times as NSStrings and a timezone as an NSString, how can you calculate whether or not the current LOCAL time is between these two times. Keep in mind that the date in the time strings do NOT matter, and are filled with dummy dates. For example: ...

how to get touch event for uitextview

HI, Apple not providing touch events for UI-text View, im developing project includes notes, that can readable ,editable, can give color to selected text. for that i chosen UI-text View because it can readable as well as editable. to do some events on text of UI-text view need touch events ,but Apple not providing touch events for UI-te...

What's the fastest way to load big image on iPhone ?

Should I use UIImage or CGImage ? Png or Jpg ? I've read the doc and tried different things but did not notice significant improvement. Loading an image can take 1 good second which seems slow ...

iphone dev - problem with @selector

Hi guys in my app I am trying to run some code that currently exists in my applicationWillTerminate in appDelegate. I have c/p'd the same code into the method that is currently running (verified by NSLog), but the code just doesnt seem to execute the same way. The following code is from my applicationWillTerminate, which saves data, re...

Backup/Restore iPhone adhoc build via iTunes

Is there any way to backup/restore iPhone adhoc build via iTunes? I tried different ways and manipulation and it seems to be impossible for me. But probably someone know any tricky solution to do so. I'm asking about this to test whether application works correct after restoring it backup on another device. I have live app in iTunes and...

Using OpenGL ES rendering instead of CGContextDrawImage

Hi, all! I am novice in OpenGL ES so your help will be much appreciated. I have a code which cuts part of images (something like mozaik image) and shows it on the screen: UIImage *top = [images objectAtIndex:0]; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmapContextCreate(NULL, pageWidth, ...

change class of TableViewCell according to ViewController in which tableView is present.

I have only 1 tableView class but 4 cell class. I'm adding the same tableView to all the viewControllers present in the app. The difference is the type (class,to be precise) of the cell. I want to change the class of cell according to the viewController in which the tableView is present. Also, the cell's content view is drawn in another...

*** -[UIDeviceRGBColor size]: unrecognized selector sent to instance 0x25f110

-[UIDeviceRGBColor size]: unrecognized selector sent to instance 0x31e520 2010-03-18 12:36:48.511 IChitMe[4012:207] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '** -[UIDeviceRGBColor size]: unrecognized selector sent to instance 0x31e520' I'm getting this exception when I'm clicking on back button of...

Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain

Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain ...

problem with NSInputStream on real iPhone

Hi guys, I have a problem with NSInputStream. Here is my code: case NSStreamEventHasBytesAvailable: printf("BYTE AVAILABLE\n"); int len = 0; NSMutableData *data = [[NSMutableData alloc] init]; uint8_t buffer[32768]; if(stream == iStream) { printf("Receiving...\n"); ...