objective-c

In Objective-C, How one can forward method to specific super class.

All I knew is this: Objective-c allows us to forward method invocation to its super class by [super method] However I want forward the invocation to super.super; Skipping the immediately super class. In c++ we can easily do these by typecasting ((GrandSuper*)object).method(). Is their any provision to do the same in objective c ...

GameLoop() vs Delegation - massive prformance boost

Hello, I just finished my first game and just submitted to apple for aproval. Its a simple space shooting game where obsticales come at the player and you shoot them. I used "traditional" approach using the gameloop() which is scheduled 60tps. On the final stages, I tried to implement particle FX and simply was unable to put more then tw...

how to decrease the application size

hi all, My problem is that my application size is very high, is there any idea to reduce size of application? if i make application without content and content is uploaded my server then how i sync the application with content put on my server? i want to know that once user download application after that when he use application then...

How to print or know the values in autorelease pool?

Hi, I have a large set of code and i need to test them with memory management concepts. Can i know how to print or know what are the objects a particular pool contains? Please help me? ...

what is the best way to share an object between different views in iphone?

I developing an app, and I have an object with data from the user but this object has to be used in different views. I would like to know the best and more light way to share the object between differents views. Actually I have the object in the appDelegate and I'm trying to access by the following method yourObject* obj = [(YourAppDel...

How can I use class_getProperty in iPad?(Not simulator)

I'm using class_getProperty() in my iPad app(I imported objc/objc-runtime.h). And it works successfully on iPad simulator. But when I tried to run it on my iPad, Xcode said "objc/objc-runtime.h: No such file or directory" and "warning: implicit declaration of function 'class_getProperty'". So it didn't works. Please help me. ...

Cocoa: UI Automation frameworks

Are there any UI automation frameworks for cocoa OSX application? I dont mind changing code to fit to framework's requirements. ...

How to set the opacity of random pixels to 0 of a UIImage?

Hi, I'm working on an iPhone app which needs to have the function to reveal an image after some actions. For example: I have 2 UIImages on top of each other. The UIImage on the back is the image to reveal. The UIImage on top needs to cover this image. I need a method that I can tell to reveal the image. So if I call the method, and le...

reseting CGContextRef after drawing pdf page using CGContextDrawPDFPage

I am trying to create thumb images for every pdf page in PDF document and place it in a UISCrollVIew. I have succeeded in this, but scrolling is not so smooth as I want when it's too fast. And I want to optimize thumb images creating for Pdf page. I want to create one CGContextRef and reset its content after CGContextDrawPDFPage, as a co...

split iphone objective-c code in to multiple files

I have written a few apps for the iphone now, but they are all written in what I consider to be a lazy, unstructured way. I have started a new project and have created several Objective-C classes (subclass of NSObject). the problem I have is getting the logic correct in my head. My structure is as follows viewController.h viewControll...

Adding UIViewControllers to a UIScrollView

Right, this may not be possible but maybe it it... I have 3 UIViewControllers, each with their own XIB files which contain the layout for each slide of a presentation (each slide will contain video, images, other interactive elements). I have hooked them all up to a UIScrollView by adding them one by one, see below: page1 *vc = [[page1...

Moving the background image of iPhone upon event

I have a navigation based app where a certain pushed view has a nice background image. Now this view contains a UITextView which is transparent so my background shows all over the whole view except the top which holds the navigation bar. Now when I start editing the textview I would like the for the textview and the background image to "...

Objective-C: Is there any event when a Table Cell goes away?

Hello, Is there any message I can override called when a Table Cell goes away (on scrolling the table)? I think it should be something like dealoc. I'm asking this because I have below situation: I have a table with many cells (100+) and each of this cell contains a ImageView. For loading the image (from a URL) I'm using NSOperationQu...

Detecting focus/unfocus of active NSDocument

Hi, Is there anyway to detect the focus/unfocus of an NSDocument? I would like to dynamically update a menu item that pertains to the active document but I can't see any immediately obvious way of doing it. The reason being, I'd like to activate and then populate the menu on document focus, and then unpopulate and deactivate on loss of...

activity indicator and CLLocation Distance

In my application i load at startup the distance between user location and a known point; I want to show at startup an activity indicator with a label "Loading" that then disappears to show the distance. How can I do? ...

Native app for iPhone!

Hi All, I want to develop a native universal app(i.e for iPhone and iPad) for my orgaization.I want to include some of the essential features of the organiztion website into my native app.For obvious reasons i cant store this huge data into iPhone itself.so data will be fetched from the server but application would be a native app.so ar...

NSTableView Row Height based on NSStrings

Basically, I have an NSTableView with 1 collumn, and I'm inserting long strings into each row. However, not all the strings are long, so I'd like the height of each row to be different based on how long the string is. I've figured out that I need to ask the collumn how wide it is, and then ask the string how many lines it will take up i...

plist file is not updating..

I am updating a plist file using an iphone app but when i check that plist file in XCode it contains the same data. plist file in XCode is different from that of iphone? ...

Stopping a custom UIButton reseting titleLabel to IB default on event firing

In IB I have a view with a UIButton of Type Custom, it has no image and the Title is set as "#placeholder" The view is attached to a class that provides an IBOutlet and an IBAction for the button. I set the button title with this: ViewClass.ButtonOutlet.titleLabel.text = @"%@",stringifiedVariable; whenever i need to. This works ok. Ho...

NSTextField Color issues

I am dynamically adding a NSTextField to a window and am having issues with rendering. I am setting the background color to be black and the text color to be white. These both work but their is what appears to be a rectangle that is part of the text that is always white. Does anyone know what I might be doing wrong? How can I get rid of ...