objective-c

Crash when accessing a NSMutableArray member variable

I'm having some trouble with a NSMutableArray. I'm sure i'm doing something wrong with the allocation of the NSMutableArray but it's not obvious to me being an iPhone newbie. When i run the code below i can add the object MyObject to the array objects_ and set the name etc. The NSLog displays the correct data. But when i try to access t...

GameKit Server/Client

I have been trying to implement the GameKit Framework for bluetooth connection and want to use a Server/Client relationship to reduce lag and be able to distinguish between to connected devices. I found this thread and it is similar to what I am trying to do, but the code doesn't work for me. Here is what I have: Connect Method: -(IBAc...

How can I make a window or NSPanel out of an image?

Hi everyone, I'm trying to add some style to my app and it's driving me crazy. I'm wanting to take a image that is transparent and use it as a window or NSPanel. I'm thinking this will have to be done programmatically but I would like to do it in Interface Builder. How can I achieve this effect either way. So far, I've tried both ways an...

in core-plot, how do I get my axes to float?

I've tried setting isFloatingAxis to YES, but it just makes my axis disappear. My axis is set up as follows: CPXYAxisSet *axisSetKin = (CPXYAxisSet *)kinematicsGraph.axisSet; CPXYAxis *xKin = axisSetKin.xAxis; [xKin setIsFloatingAxis:YES]; xKin.labelingPolicy = CPAxisLabelingPolicyAutomatic; xKin.orthogonalCoordinateDecimal = CPDecimal...

How to prevent all rows of an NSTableView being selected at startup

I am new to Objective-C. I am using NSArrayController to fill NSTableView. Initially, I am getting all rows selected in the table view. I am unable to find the reason behind it. ...

Can't correctly rotate cylinder in openGL to desired position

I've got a little objective-c utility program that renders a convex hull. (This is to troubleshoot a bug in another program that calculates the convex hull in preparation for spatial statistical analysis). I'm trying to render a set of triangles, each with an outward-pointing vector. I can get the triangles without problems, but the v...

How to display the large text if this method "titleForHeaderInSection" returns in iPhone sdk?

Hi Guys, I am unable to display the total information if the results are nil in iPhone. -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { if ([customerList count] == 0) { return @"Could not find any doctor with your search. Please try again."; } return @""; } I Declare...

problem in passing data when pop from one view to another view controller in iphone

hello I am having a application in which one view controller is pushed and when we pop from the pushed controller i do not get the value for the variable For eg consider there is A controller i n which i am havinh the int variable named Component now i push to B Controller on click event of button from A Controller ,When we are pus...

a question related to state maintenance.

Hi all, I am new to Objective-C. I know how to save values using NSUserDefaults when the user presses the home button but it affects my application's performance. I want one method that saves values without affecting my application's performance. ...

Speed up iPhone application when consuming web service

I have an iPhone application , which is consuming a Soap web service. When am sending a URLrequest, the application is getting slow.My application is a TabBarApplication.From a started calling web-service to parsing the received data, i can't select Tabs in UITabbarcontroller. How to speed my iPhone app Tabbarcontroller to get selected e...

Can I get the element by Tag from iPhone SDK?

I want to get back a button, I have already assign the tag to there, how can I do so? Thank you... ... ...

Removing leading zeroes from a string.

I have a string 0023525631 but what I want is the string 23525631 without the leading zeroes. How do I do this; I am confused about it. ...

How to get all rows of same group in TableView

Please help me to get all rows of same group in tableView. i am using below code to show radio/check in groups of tableview and want the only one per group selection. so for that i have got 2 images 1:uncheck 2:checked so when user will click/select a row of group than i am changing its cell.image to "checked" and its working but don't...

weird background in grouped table cell

Hello We use in our application cells in a grouped tableview as buttons. Therefore we set a backgroundimage to look the cells like buttons. We used the following code: cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_gradient_mainmenu_2.png"]]; cell.textLabel.textColor = [UIColor whiteColor]; cell.textLabe...

How to insert data coming from web service into sql database in iphone??

Hi, I am developing an app where I need to insert data coming from web service into sqlite3 database.Web service returns XML data with 5 tags.Now after XML parsing how to insert parsed data into sql database? Can I code for this??? Thanks in advance.. ...

How to rollback iPad OS 3.2.2 to 3.2

Hi Friends, How to rollback iPad OS 3.2.2 to 3.2 for development purpose. Regards Ranjan ...

how to switching the process to local thread in iphone?

Hi, In My application for navigate tabbarController, i did common function, and when select a row in tableview, i am calling that funtion from my tableview. it works nothing, that is Switching the process to local thred, but controlle is not working. how to redirect the controll. Regards Srini ...

when to alloc and initialize a view controller

Hi, recently I joined two Xcode projects together. To get this thing to work, I had to alloc and initialize my view controller. self.myViewController = [[MyViewController alloc] init]; But why? In the other project I have the same code. The sole difference is hierarchy of the different views. I added a new view to the top (beginning)...

Calling method twice crashes application

Hi, am writing an application that plots point on a graph and am using the below method to return an array of these points. I have two views, each displaying different graphs but both have this identical method. Whichever graph is used second causes the application to crash when it reaches the line "NSArray *reading ...". I can't figure ...

Why use NSAutoreleasePool?

Consider the following program: int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // Insert code here... NSLog(@"Programming is Fun !"); [pool drain]; return 0; } I don't understand why pool is needed there as the same program can be also written as this: ...