objective-c

UIImageView animation with stop on final frame

I'm using UIImageView's animationImages to show some frames over a second. I want to show the animation then have it rest on the final frame. In OS 3.1.3, this worked fine for that: [self setAnimationRepeatCount:1]; [self setAnimationDuration:1]; [self startAnimating]; // auto set the last image in the frame [self setImage:[UIImage imag...

How to create a Cocoa library and use it in python.

Hello. I've been making a game and the python library I was used is terrible (Pyglet). I want to try using Cocoa for the OSX version. I'll be able to figure out using the objects from classes like NSWindow and NSOpenGLView and then put these objects in my own class for the game loop. I have no idea how I can use PyObjC to load a dynami...

How to change the alpha value for the title of the UIButton in Iphone sdk?

Hi Guys, I need to change the alpha value for the UIButton can any one suggest me how to do with it. And the button code I written as: UIView* buttonView = [[UIView alloc] initWithFrame:CGRectMake(10, 0, 100, 40)]; buttonView.backgroundColor = [UIColor clearColor]; backButton = [[UIButton alloc] initWithFrame:CGRectMake(5, 5,...

In my pedometer application, why doesn't my NSTimer stop when I want it to?

Please help me, friends. I have finished making a steps counter. My problem now is that my timer starts with the accelerometer, but it doesn't stop when the accelerometer stops.(Pedometer is an application where the user can count his\her steps. With this information, the user can count his total calories consumed, and the total elapsed ...

Detecting whether a process starts and finishes with notifications in cocoa

Hi everyone, I was wondering if there was a way that I could get notifications of when a system process from /usr/sbin starts and finishes. Is it possible to attach NSTask to the running process without launching a new one? Preferably without polling please :! ...

iphone/ipad html search

The iphone app im writing displays an html page, i would like to add a search feature where the user can search for instances for the keyword and highlight them (like in firefox using ctrl+F) what's the best way to do this? in objective-c? would this be even possible with javascript? Please point me to the right direction ...

Store enums in an NSArray?

Hi, I'm new to Objective-C, but experienced in C++ and C. I want to store some enum constants in an array. In C++ I would do something like this: enum color {RED, BLUE, YELLOW, GREEN}; vector<color> supportedColors; supportedColors.push_back(RED); supportedColors.push_back(GREEN); But the NSArray will only store object pointers (id...

how to skin an iPad app

im new to ipad/iphone development. what are some ways to skin an ipad app? (eg: the notes app that came with the iPad) Is there any tutorials or code samples? ...

How to implement CoverFlow in iPhone apps?

Possible Duplicate: Open source iPhone Coverflow like library What is the best way to implement a CoverFlow like interface for the iPhone? Does Apple provide any libraries? ...

Using an NSMutableArray instead of an NSFetchedResultsController

I've recently come to learn that NSFetchedResultsController is an extremely buggy class and its been causing me headaches for a while now with my rather large Core Data app. Would it be appropriate to use an NSMutableArray to feed the table view instead of an NSFetchedResultsController? What I'm talking about is, temporarily creating a ...

Fetched properties as properties of an NSManagedObject subclass

I have a subclass of NSManagedObject (NSMO) called Team. Team has a one to many relationship with another NSMO subclass called Contract. Contract has a 1-to-1 with Player (another NSMO). I would like to simplify my code that uses Team and be able to just refer to its "players". Players will just be an array of players that have a contrac...

getting values from NSTextField in objective c and xcode

How can I continuously get data from an NSTextField and do this in the background? I'm doing this because I'm using a quartz composer plugin to get posted values in an NSTextField. This is within the same app. Any ideas?? Elijah ...

playing sound files in resources folder

I have some mp3 files in my resources folder, how can i play those mp3 files? I just know their name. ...

Is objective-C garbage collected?

Is objective-C garbage collected? ...

A simle view with a button that calls another view with a tab bar controller

It is quiet embarrassing but I just don't get it. How should I browse prom viewA to viewB to viewC if I have a main view "viewMain"... how can I make it call a view with a tab bar controller for the views viewTabA, viewTabB and viewTabC. (All views should give me the option to go back to the main view "viewMain") It just so frustrati...

opposite of enum (using formula) (objective-c)

I have 4 numbers 0-3 which is an enum (objective-c) and I'd like to get the opposite using a formula. So if 0 is put into the formula it returns 2 and if it 2 is entered then it returns 0 (and same with 1 and 3). The reason being (and it is programming related) that I want to get the opposite of an enum without having to do an if or swi...

Possible embedded database engines to use in an application

Are there any alternative to SQLite to use as embedded database engine? ...

iPhone Facebook SDK: failed to post status the second time

It happens even with the sample projects from the github. The first time it worked fine in updating my status, but the second time debugger always shows an error_code = 1, and error_msg = "An unknown error occured". Yes I clicked the "Get Permission" button first. And this is the sample project. Posting stories worked fine, although the...

Determine if a file is a valid video quickly

What is the fastest way to determine if a file is playable video? I am not concerned with it being corrupt or not but just whether it is a mime-type that should be playable on the iPad. I have played with pushing the file through a NSURL as suggested by another question but that can take > 1 second per file which is too slow. I am cur...

Debugging changed with XCode 3.2.3?

Recently switched from XCode 3.2.2 to 3.2.3 for iOS4 and i noticed that i can no longer view the values of my property variables or any variables for that matter in the debug window? In 3.2.2 when a breakpoint was reached i was able to view all my class variables in the "self" tree node in the variable window. I could also just hover o...