I'm quite new to objective c but have been programming for a while. I started creating a function that would convert from RGB to HSL and back again but I get a feeling it is way too long and headed in the wrong direction. Does anyone know of a simple way to perform this conversion?
...
Good Afternoon Guys and Girls,
Hopefully this will be a quick and easy question.
I am building an App that requires the user to input their login details for an online service that it links to. Multiple login details can be added and saved as the user may have several accounts that they would like to switch between.
These details will...
I'm trying to get a value from an object in my mac application. The title says it all.
...
I am writting an application which must know when a window is resized or moved.
I had a look on notifications but it seems it does not do what I expected.
Do you have any idea how I can achieve this?
...
Update: It seems to be a problem with the scope of the "results." titleForHeaderInSection seems to be unaware of the "results" arrays content. Will post once I find a solution just in case anyone stumbles across this with the same problem.
How would I set each individual row in cellForRowAtIndexPath to the results of an array populated...
I have a critical method in an Objective-C application that I need to optimize as much as possible. I first need to take some easy benchmarks on this one single method so I can compare my progress as I optimize.
What is the easiest way to track the execution time of a given method in, say, milliseconds, and print that to console.
...
Ok, so I'm using Objective-C. Now, say I have:
TopClass : NSObject
- (int) getVal {return 1;}
MidClass : TopClass
- (int) getVal {return 2;}
BotClass : MidClass
- (int) getVal {return 3;}
I then put objects of each type into an NSMutableArray and take one out. What I want to do is run the getVal func on the appropriate object type, ...
Hi everyone,
First off, I know that similar questions have been asked, but the answers provided haven't been very helpful so far (they all recommend one of the following options).
I have a user application that needs to determine if a particular process is running. Here's what I know about the process:
The name
The user (root)
It sh...
I saw these lines in a demo project, but I couldn't understand why it did that.
[self willChangeValueForKey:@"names"];
[self didChangeValueForKey:@"names"];
It called didChangeValueForKey immediately after willChangeeValueForKey.
Does it make any sense?
Furthermore, when should be the right time to call this two methods?
Thanks a lo...
New to Objective-C iPhone/iPod touch/iPad development, but I'm starting to discover lots of power in one-liners of code such as this:
[UIApplication sharedApplication].applicationIconBadgeNumber = 10;
Which will display that distinctive red notification badge on your app iphone with the number 10.
Please share you favorite one or two...
Okay, I want to have an app that takes phone numbers from an online database and displays them in a table view. When the user is not online, I want them to still be able to see the numbers they already got from the database in the table view. If the user manages to go back online, the database updates the view. My question is, is this po...
I am new to CoreAudio, and I would like to output a simple sine wave and square wave with a given frequency and amplitude through the speakers using CA. I don't want to use sound files as I want to synthesize the sound.
What do I need to do this? And can you give me an example or tutorial? Thanks.
...
Here is my custom class:
PolygonShape : NSObject {
int numberOfSides;
int minimumNumberOfSides;
int maximumNumberOfSides;
}
My custom init method:
- (id)initWithNumberOfSides:(int)sides minimumNumberOfSides:(int)min maximumNumberOfSides:(int)max {
if (self = [super init]) {
[self setMinimumNumberOfSides:min];
[self setMaximu...
Hi everyone, I'm wondering if it's realistically possible to learn the iPhone SDK and complete an app by the end of this summer. The app shouldn't be too difficult, it would just interact with my site's API and essentially just fetch, create, and edit resources. I already have a little experience with the SDK (and I'm comfortable with Ob...
I am trying to load a video from the web, but am having trouble getting it to appear in QuickTime. I can only hear the audio. I would like it to launch QuickTime.
- (void)loadView {
NSURL *movieURL = [NSURL URLWithString:@"http://movies.apple.com/media/us/mac/getamac/2009/apple-mvp-biohazard_suit-us-20090419_480x272.mov"];
if ...
Hi,
I have an iPhone application which contains a lot of media files, so far we have been able to keep the size of the iPhone app to less than 20 MB. We add new content with new updates, it would be difficult to keep the app size within the 20 MB limit.
The right thing to do here would be to fetch the files on demand from a media/web s...
How would I access the properties of an object stored in an array?
something like:
[myArray objectAtIndex:0].intProperty = 12345;
...
I'm very new to Objective-C and Cocoa but I've made a simple app which uses ImageKit to present a slideshow using the IKSlideShow class. However I've got a bit stuck with something I thought would be simple. I want to increase the time photos are displayed on screen when the slideshow is playing, but I can't see how to do it effectively....
Hi
Really puzzled why the following is happening and hope someone can help.
// here xPos correctly traces out, always changing
//CODE EXCERPT
CGFloat xPos=currentTouchPosition.x - lastTouch.x;
NSLog(@"touchesMoved and xPos= %f", xPos);
if (startTouchPosition.x < currentTouchPosition.x)
[self adjustTimer:xPos];
else
...
Hey there,
I'm currently working on an app which displays a bunch of files in a table, and you can add and remove them and whatsoever. To prevent duplicates in the table, I'd like to create a NSDictionary using the files full path as keys for another NSDictionary which contains all the file information, but I am a little concerned about...