iphone

activity indicator not showing up on iPhone

I am using a standard navigator interface on the iPhone. When I move from the highest level tableview to the next level, I have to load about 2000 records from core data, which can take 5-10 seconds, so I want to use an activity indicator. I have done the following code which works if I remove the code in the DidSelect method, but othe...

How to continue my application after quiting call which is intiated from my app in iPhone?

Hello, How to continue my application from the same state, after quiting the call which is been done from the app. since we are using iPhone 3.1, i understand that it supports making a call from my application. i'm able to launch the call, but my application is getting terminated before it, so that i'm not able to resume it after quitti...

CFNetwork packet read callback not being called (iPhone)

Running on the iPhone simulator, I am listening on a port for packets, but my callback never gets called (and the packets are being sent for sure, checked with wireshark). Simplified code follows: #define IN_PORT (51112) static void ReadCallback (CFSocketRef theSocket, CFSocketCallBackType theType, CFDataRef theAddress, const void *da...

Persiting data / instance variables in NavigationController View

I have a root view and a detail view, in the detail view is a AVAudioPlayer with a basic play/pause button setup. All works, however if I play the file and then click back (popViewControllerAnimated) to the root, the file keeps playing which is correct, but then if I click back to the detail view the view has reset and doesn't find the i...

Grid of Buttons on iPhone that Can be Dragged Over

I am looking to create a simple colour palette, and have setup a grid of buttons in interface builder. I'd like a user to be able to interact with the palette (buttons), by selecting any button, then drag the finger between buttons (firing events on entering and exiting a button and changing the selected colour with each event). Is thi...

How to declare variables in a class that do not release?

I need to create two instances of two classes inside a view controller that stay alive for the entire time that view is open. Inside theese one of theese classes I need to create a NSString and a NSDate that stays alive for the entire time the class is alive. How do I do this? ...

How to locate which programmatically created button is clicked?

Hi, I am doing an application on a Multiple Choice Question (MCQ) where I have to get questions, answers from a webservice. I have 1 question with 4 options, among the 4 options, I have 1 correct answer. Each of the options, I created a button programmatically. This is how I did it: UIButton *button = [UIButton buttonWithType:UIBu...

sending reload data from custom tableview cell?

How would I go about sending a reloadData message to the tableView from a custom tableViewCell? ...

How to update UIProgressview in Tableviewcell ?

after i add UIProgressview into cell.contentview , how can i access to update Progressview on that cell ? ...

iPhone Core Data and Multithreading

I have an iPhone application I am developing which transfers data over the network and saves the data received in core data object for use later on. Presently. it works correctly in a single thread but I am working on converting the data transfer mechanism to run in a separate worker thread. I've read the core data programming guide on...

Strange NSString stringByAppendingString behavior

I have an object that is appending a local string to another, and then handing that to an instance variable. This StringObj is being held by the calling UITableViewController. On the first call, fullCmdString has the string correctly. However, on 2nd call, the fullCmdString is null, or full of weird data (looks like data in odd mem locat...

Unit Test Cases for views/viewcontroller and Delegate functions for iPhone

hi, I need to write unit test cases for my views.Using some apple demo projects i learnt how to write a unit test case for simple functions(which includes mathematical logic like GCD,Prime etc). now i need to understand the same for Appdelegates and views. so I need to know 1.how to start writing cases for delegates,views and learn the ...

TV Out working with iOS 3.2 but not with iPhone OS 4.0

Hi, I'm developing an app for both iPad and iPhone OS 4, I need TV Out support for both, my code works fine on iPad running iOS 3.2 but when I try it on an iPod with iOS 4.0 it breaks: if ([UIHardware TVOutCapable]) { //returns true in both devices with cable connected //the followin line breaks UIScreen *externalScreen=[[[UIScr...

iPhone SDK screen size returns different results using similar syntax

I'm new to Objective C for iPhone. I tried the following code to get the screen size, however the code below returns two different result: CGRect screenRect = [UIScreen mainScreen].bounds; NSLog(@"width: %d", screenRect.size.width); NSUInteger width = [UIScreen mainScreen].bounds.size.width; NSUInteger height = [UIScreen mainScreen].bou...

Is TA-lib.org support on iOS on iphone?

Hello everyone, I would like to add Technical analysis support to my financial project on iphone. And I found TA-lib on www.ta-lib.org, this library supports many indicators I need. I would like to ask: Can I use ta-lib on my iphone development? And how I can do it, because this library is written in C language? I knew that Cocoa can c...

Auto Resizing with Interface Builder and Code !

I want to use auto resizing mask in iPhone to adjust view in landscape and portrait mode. The problem is when I apply width spring from Interface builder, the button changes its size proportionally. But when I apply the same spring by code i.e. [self.view setAutoresizesSubviews:YES]; [testButton setAutoresizingMask:UIViewAutoresizing...

Socket programming in iPhone

Hi, I wanna implement a chat application. When i gone through few threads and tutorials, i think i need to use socket programming for this purpose. Can anyone provide some basic idea for socket programming in iphone.And what all things i have to refer for famliarizing with socket programming. Thanks and regards, Sreelash ...

iphone image in frame?

i am planning to make an application where i can take photo from my iphone and put it in to different frames. can anyone tell me which steps i have to take initially and is there any tutorial available for me which can help me around.. thanks in advance... ...

Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000 Error

Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000 What is Kernel protection error? Where can i find the details about Exception type and code clearly? ...

How to add a string into an NSArray at particulap index?

NSInteger timeNum = time; NSMutableArray theResultArray = [[NSMutableArray alloc] init]; [theResultArray insertObject:[NSNumber numberWithInt:timeNum] atIndex:rightIndex]; This is the way we do to insert NSInteger to array. How to i do it for NSString? ...