objective-c

What is missing in Objective-C that you don't want to program with it

Now that Apple relaxed the restrictions on developer tools/programs, I wonder what tempts developers to other languages than Apple offers by default, Objective-C, which is quite fun to program with. What missing feautures makes you not to program with it but something else? ...

Objective-C Auto Adjust Subviews

I'm looking to write a method for an iPhone app that will auto adjust a UIViews's subviews Y values depending on the available space within that view. I'll try my best to explain without getting too confusing. I have a Container view that is housing up to 3 Subviews. With in each subview is a button that removes the sub view from the co...

Why is my program leaking memory allocated for objects I don't use, from a framework I don't use?

I ran a leaks report on a program I am developing, with the following results: Process 2454: 155054 nodes malloced for 7464 KB Process 2454: 6 leaks for 608 total leaked bytes. Leak: 0x14984360 size=160 zone: DefaultMallocZone_0x127000 instance of 'SecCertificate', type CFType, implemented in Security 0xa024562c 0x01015580 0x...

UIView frame when navigation bar and tab bar controller exist

I am creating a UIView programatically in loadView. The application has a UITabBarController and UINavigationController. How do I create a view that automatically resizes when a tab bar and a navigation bar both exist? My current approach to this problem is calculating the heights of the navigation and tab bar controllers and subtracti...

Position of window in Cocoa

Hi, i have simple question: How to get position of window on screen in cocoa? I try using frame from NSWindow but in result i have x and y of window always 0, but my window isn't on this position. Best regards Chudziutki ...

Do graphic operations off-screen incur a processing overhead?

I'm trying to optimise some graphical routines for an app, and I'd like to know if off-screen animations (eg, [object startAnimating]) or just plain moving of a UIImageView by setting its rect (off-screen), have any processor overhead, or are they somehow ignored when off-screen? Many thanks for any help. ...

I want to make iphone apps but do i really need to learn objective c ?

I want to make iphone apps but do i really need to learn objective c ? I love Languages like Ruby, Python and PHP. Is it really worth me spending my time learning objective c ( i understand i have to learn c first)? Any advice, help, tips tricks would be greatly appreciated. Thank you in advance ;-) ...

Should I test a model class which sync often to the server?

And how do I do it, since obviously there are a lot of async methods, and no way (that I know of) to check them in a unit test. For example: - (void) testSomeTest { // things [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(helperTestSomeTest:) name:connectionFinished object:nil]; // connect to server } - (void)...

Need to load data from Bundle into my iphone app.

Hi Guys, I'm looking for some guidance/code-snippets/tutorial on passing some simple data into my app. I have some data in a text file at the moment. Name,Age,Weight Name,Age,Weight etc, etc,etc There is not much. It will be read only since i wont need to change it. How can i go about reading this into my app? What do you recommend? ...

Symbols in Obj-C

What are all of the symbols in obj-c? Like %@, %d, etc. What do they all mean? Thanks ...

NSDictionary parsing howto

Hi, I have an NSDictionary that when printed looks like this ( { "current_game" = 1; "fb_id" = 1; "game_status" = 1; }, { "current_game" = 4; "fb_id" = 2; "game_status" = 1; }, { "current_game" = ""; "fb_id" = 3; "game_status" = ""; ...

Content of cellLabel.text seems to be overwriting itself in random cells.

I have a UITableView that is being populated from an NSMutable array that has 79 entries in it. When I run my app and scroll down the table there seems to be multiple entries in one cell. It seems to happen about a screen height and a half down the table. For example: One object in the array is @"Dog" and another is @"Cat". In one cell...

How do I identify the gamekit message window?

When an iPhone app with GameKit launches, and the device is already logged in to GameCenter, a small message slides in on top of the screen, saying something along the lines of "Welcome back %username!". What I found out is the following: that message appears in its own UIWindow that eventually slides the message away and releases itsel...

NSDictionary objectForKey not working

Hi, I have an NSDictionary that when I NSLog prints this out { 206510 = 1; 622845 = 1; 926131 = ""; 100000977163362 = ""; } Why does [dict objectForKey:@"206510"] gives null? This is how I setup the dictionary in the first place. [dict setObject:[status objectForKey:@"game_status"] forKey:(NSString*) [status obj...

Who is self referring to?

I'm trying to understand the use of the keyword self Let's say that I have two classes one called AppDelegate and one called Photo. Photo is my "model" class in the MVC paradigm and AppDelegate is the controller.In the init method of the Photo class below. Who is self referring to? -(id) init { if( self = [super init] ){ [s...

Question about an NSMutableArray of a certain class

Basically I have an NSMutableArray set up like so, with instances of another class as the array elements. [[NSMutableArray alloc] initWithObjects: [[Shape alloc] init], [[Shape alloc] init], nil]; Each of the shape classes has an instance variable that holds what kind of shape it is. I want to be able to make this array so that it ass...

Offline map using cloudmade

how can i implement offline map using cloudmade? is it possible with cloudemade? is there any sample code? Any help is appreciated! ...

How to programmatically detect iphone 4

Hey Guys, So I looked at this thread: http://stackoverflow.com/questions/3177634/iphone-how-do-i-detect-the-iphone-version But it doesn't answer how to look for iphone 4. Also, it seems like ugly code. Maybe there's an easier way? I'm also looking specifically for detecting iphone 4 in code. Any ideas? Thanks! ...

When I submit my app to the Apple app-store do they see my source code?

When I submit my app to the Apple app-store do they see my source code? ...

can not find protocol NSApplicationDelegate

Hello everyone As I know, NSApplicationDelegate is available in SDK for 10.6 Is there any similar protocol as NSApplicationDelegate for ealier version(mine is 10.5.8)? Thank interdev ...