objective-c

Copying Multi-Dimensional NSMutableArray

I'm currently working on a Sudoku application, the numbers are stored within a Multi-Dimensional NSMutableArray of NSNumbers. I keep an array in my SudokuGridView, for displaying the numbers in the grid. When it comes time to solve the puzzle, I pass a [grid numberGrid] to a subclass of NSOperation I've created that solves the puzzle. T...

Approach for Client-Server Communication in Objective-C / Cocoa

Hey guys, I am working on an application for OS X that needs communication of small bits of data between a server side application and a client side application. I tried using a Ruby on Rails server as a backend way of communicating data, which was very simple and easy to implement but caused a bit of issues (I am not a proficient Ruby ...

How do I read Objective C methods

I think the biggest problem I'm having with understanding programming is understanding what a particular method does. For example - (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex When I look at the above method I know that it returns a boolean and that the method r...

serialize java objects to objective c plist

Hi, I have a java web server (google app engine to be precise) and which works with an iPhone app written in objective C. I'd like to transfer data from the server to the client - specifically I'd like to serialize my plain old java objects to an objective c plist string so that it can be easily parsed by the client iphone. Are there an...

Using an old OS category and a new OS informal protocol in the same code base

NSStreamDelegate was defined in previous OS as (NSObject)NSStreamDelegate In the latest OS it is defined as id Both have the same function. If I want to write code that is Runtime system aware. How do I create an object that is both and neither? I dream of that truly universal app. if (catchOS10.5_or_iOS3.2) { [MyStream setDelegate:m...

Add images, string file to static library in iPhone

I want to make a static library which basically displays some views and button. My client wants this to be distributed as a library to be used by other iPhone developers. My doubts are Can we add images and other resources to the library .a file? How can we include localization to this static library?(localizable.strings??) ...

How to open a dialog box in iphone?

I want to open the dialog box when the user clicks on a browse button in the nib. This would search for a picture he wants from his pc and upload it. How do I do this programmatically in iphone. ...

generating multiple subViews of recently opened web pages ???

How to maintain a record of recently opened web pages to generate multiple subView using XCODE. similar to that in "Safari" in iPAD. i'm using ipad simulator 3.2 and i'm a begineer in this field. ...

How to declare the nsurl variable with inital value as nil and also for nsarray?

Hi, This is a simple and basics but I had a doubt that if it is declared globally with out initial value what happens ? NSURL *finalURL; // here i need to initial value as nil if it is like this NSURL *finalURL=@""; giving warning. nssarry *array=nil; // is this correct. Please give the reply, Thank You, Madan Mohan. ...

What's the correct method to subclass a singleton class in Objective -C ??

I have created a singleton class and I want to create a class which is subclass of this singleton class, what is the correct method to do it ...

how to search for an image in iphone

hii, how can i programmatically search for an image in iphone. as i am developing the application like that which would browse for the image in iphone. ...

have to save UITextfield's value to the NSUserDefault and then send this value to server

i am trying this code .i jst want to save the value to NSUserDefault,trying to hold the value of NSUserDefault to local var val1, and later on have to send this value val1 to server, but when i run build the application ,username = null appears... m in big trouble..plzzzz help me out....alternate code would be apprecaited.....Thanx in ad...

On shake of an iPhone move a ball in shaking direction..(using box2d physics)

Hi, Please look at the code first.... - (void)accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration { b2Vec2 localPoint; localPoint.Set(0,0); if (acceleration.x>1.5 || acceleration.y>1.5) { b2Vec2 mVelik = ballBody->GetLinearVelocityFromLocalPoint(localPoint); b2Vec2 forca...

iPhone FileType Mapping / UTI for ICS attachment in Mail

Hi Everyone, I've been able to successfully map an application using UTI's from mail using my own file types such as .blah, .test etc, however I would like to create a UTI for the .ics (iCalendar meeting requests) extension. I thought this would be rather simple, as I've been able to test reference to Word Documents, PDF's and others ...

how do I change auto-generated UIImageViews?

Hello, i create UIImageViews automatically via a for-loop: for (int i=0; i<anzahlzeilen; i++) { Anfanggrau = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Grauer-Balken.png"]]; Anfanggrau.frame = CGRectMake(0, [heightofrow intValue]*i,[breitescroller2 intValue],[heightofrow intValue]); [Inhalt1 addSubview:Anfanggr...

libcurl authentication on iphone?

Is there any way i can use libcurl library in Iphone to authenticate? ...

Simple XML parsing

Is there a simple way of parsing XML within iPhone app's? I have been using NSXMLParser and I have heard of libxml2 - I am correct in stating that these are my only two options. I just don't want to go down a long road when there is something simply that I can use. ...

how to fit radius in mapview

i have a MKMapview with 1000 meter radius circle. how to fit that circle exact in the MKmapView rect? How to adjust the span level for fitting the circle inside the MKmapview? ...

UITabBarController and switching from one tab to another through code

Hi I have a UITabBarController that controls two tabs, Main and Settings. Now I would like, under certain conditions, to switch from the Main tab to the Settings tab (like if there is a setting the user have to do before he can use the App). I know I can do this from the AppDelegate, but my condition could occur when I'm running in th...

Alternative to NSCollectionView in pre-OSX10.5, Cocotron?

NSCollectionView was introduced in OS X 10.5, and is not yet implemented in Cocotron. I am trying to implement a small app that will allow creating properly packaged data files for an online service, which will then be uploaded by an administrator. More specifically, the user will create a collection of input and output data pairs, by d...