objective-c

Are there any huge differences between objective-c and Java, or iPhone and Android?

Edit: My bad, I meant objective-c, not c#. Some reason I got it into my head it was c# the iphone used. So the answers for c# were great, thanks, but theyre a bit irrelevant, sorry about that. I've had a look but can't find anything that answers this, though a few have shortened the question by answering parts of it. Between a small gro...

Initialize a UIImageView object with a rectangle image which will be created by programming.

Hi, I want to create a UIImageView object and initialize it with a rectangle image that will be created by programming and NOT from a pre-created bitmap file. Thanks in advance, Sagiftw ...

Sorting an array with instances of a custom class

Hi I have an array filled with instances of a custom class which contains two String properties, firstname and lastname. Both have a getter method which is equal to the name of the property itself. There is also a method for retrieving the Full name of a person called "getFullName". Consider the example below. CustomClass *person = [[...

Which script language interpreters will work on iOS?

For an App that is not going to be released on the AppStore I'm looking to embed an interpreter for easy scripting needs. Since I don't really like to get down with pure C, the interpreter should be an Objective C library. While searching the web I've come across a couple of script interpreters for Objective C but whether those guys wor...

Tagging control that was created in Interface Builder

Hi, Many will find this question quite trivial, but since I'm quite new on iOS and COcoa programming, such questions simply arise. So, I have validation methods that need to know which control has called them, because validation rules depend on specific control. I know how to tag control with UIView tag property, but this works if I wou...

Can we compile objective c on windows?

Can we compile objective c on windows? ...

how to sort an NSMutable Array reference to date in iphone

Hello All I need to sort an NSMutable Array that having a class Objects say Item . Item class have date,url,link,title,guid etc .. I am storing this Object Into an NsMutableArray each time. so MyArray will have number Of Item class Objects .. now I need to sort Myarray using date attribute . Can any one tell me the way. Thanks ...

how long will it take to learn objective c with basic knowledge of c?

how long will it take to learn objective c with basic knowledge of c? ...

Xcode's "build and analyze" reports odd memory leaks for this code

Does anyone know why xCode's "build and analyze" would report this line as a "possible memory leak"? goodSound = [[SoundClass alloc] initializeSound:@"Good.wav"]; ///// Here are the 4 files in question: // Sounds.h #import <Foundation/Foundation.h> #import <AudioToolbox/AudioToolbox.h> @interface SoundClass : NSObject { ...

How to make a Tag cloud app that post on a website?

I want to make an app where the users can post messages that will be displayed on a website. The users would need to create a username and password to be able to post. The app would be like a twitter, but only be able to post through the app and read the last few posts and not be able to write private messages. The website would funct...

NSOperationQueue and ASIHTTPRequest

I'm writing test cases for a wrapper class written around ASIHTTPRequest. For reasons I can't determine, my test cases complete with failure before the ASIHTTPRequest finishes. Here's how the program flow works. Start in my test case. Init my http engine object, instruct it to create a new list Create the new ASIHTTPRequest object and...

cancel a background thread in Objective-C

How do I cancel a background thread in Objective-C? I am calling background threads like so: [self performSelectorInBackground:@selector(setupThumbnails) withObject:nil]; It is called when a swipe happens, for each swipe I want to cancel the previous background thread request. ...

record live streaming audio

Hi guys I'm actually making an app which has to play and record streaming audio from internet on ipad. The streaming of the audio is done, I will have to come to the recording part very soon and I don't have any idea on how to proceed. Could you give me a hint??? Idea? It will have to play while simultaneously recording into AAC or MP3...

UIOrientation returns 0 or 5

I am running a simple function that get's called in multiple areas to help deal with layout on an iPad app during orientation changes. It looks like this: - (void) getWidthAndHeightForOrientation:(UIInterfaceOrientation)orientation { NSLog(@"New Orientation: %d",orientation); end And I call it in various places like this: [self g...

Scale Entire UIView Proportionately

I have a base UIView which takes up the entire iPhone screen when the it is horizontal. When the device is rotated to portrait, I want the view to basically just scale down itself and everything in it to 2/3 the size and center it on the screen so everything is shown: Image: http://img25.imageshack.us/img25/3281/rotateqx.jpg I can't fo...

How do I pass a string as a method parameter in objective-c?

I am trying to write my first class in objective-c and i want to pass an NSString object as a parameter in a method of the class, however i get an error saying that "can not use an object as parameter to a method". So my question is how do you pass a string as a parameter to a method? here is my code tht i am trying to get to work: #imp...

Add Custom buttons to Navigation Controller

I'm trying to either add 3 custom buttons to my navigation controller toolbar on the top of my view or add a segmented control with 3 options. I have the following code on my app delegate for when i create my view controller(fwc) but the buttons dont appear. /* Set up the navigation controller for the Feeding Tab */ // instan...

custom class not implementing itself when i use alloc/init or new in objective-c

i am writing my first custom class in objective-c and when i am trying to implement an instance of my custom class i get warnings that say "car may not respond to '+alloc'" and "car may not respond to '+init'" and if i use new instead i get the same warning that it may not respond to new. does anyone know why this might be? here is my co...

Getting back in the saddle ... guidance..... iPhone Development ?

I am in my mid - forties. I have always had a passion for Software Development. and a tremendous amount of respect for the craft. I, myself, am a Computer Science Major who graduated from college in the 80's. Back in the day, late 80's thru the 90's, I was a very good Borland C++ developer who developed SW as part of a team (I grew i...

How to refresh UITableView data?

I have a UITableView with two sections, which are both empty when my application launches. My app fetches the data from a URL, then puts the data into arrays (one per section) which should be used to supply the UITableView data for each cell. Calling [tableView reloadData] doesn't seem to refresh any of the data, or call any of the dele...