objective-c

Read Last Missed Call info on Iphone

Can a native iphone app read who was the last missed caller on the call list? What about last called or last received call? Ali ...

How to get title of UITabBarItem in the More section?

I have a UITabBarControllerDelegate method that determines the title of the UITabBarItem and does something accordingly. This works well for items in my UITabBar but when I click on the More button the rest of my UITabBarItems are in a UITableView. How can I determine the title in the More section? - (void)tabBarController:(UITabBarCont...

My framework will utilise other frameworks, but I'd like this to be transparent to the end-user

I'm building a framework, which aims to provide a new development environment for the user, but I need to use things like RegexKit and almost certainly some other established frameworks in order to do this. Any functionality exposed from such frameworks would be abstracted through classes and methods in my own framework for maintenance ...

Does NSArray:lastObject return an autoreleased object?

I'm working on an iPhone project where I would like to retrieve an object from an NSMutableArray, remove the object from the array and then use it later. The code looks something like this: NSMutableArray * array; // fill the array NSObject * obj = [array lastObject]; [array removeLastObject]; // do something with obj (in the same funct...

UINavigationController does not set view properties correctly when pushed

I have a UITabBarControllerDelegate that pushes a new view controller when a certain tab is pressed: - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { MyView* myView = [[[MyView alloc] initWithNibName:@"MyView" bundle:nil]autorelease]; if([self.tabBar...

Cocoa NSWindow not updating with data

I have an NSWindow that shows up when you click either of two items (both from an NSTableView). I have a setter method that tells the window what information to display. This all works perfectly, until it comes time to display the data in the window. If I cause the window to display from one tableview, then try to have it display the ...

Example of [NSDictionary getObjects:andKeys:]

I couldn't find a working example of the method [NSDictionary getObjects:andKeys:]. The only example I could find, doesn't compile. I provided the errors/warnings here in case someone is searching for them. The reason I was confused is because most methods on NSDictionary return an NSArray. However, in the documentation it states that t...

Adding different save data to one file

I'm stuck at one of the last parts of my iApp, can someone help me? I want to add different field entries of different .m files into one file without overwriting the file. (I also dont know how to make that save file btw). I have 2 .h files with : file1 : NSString *dataHML; NSString *dataHML2; file2 : NSString *dataHML3; ...

PerformSelectorInBackground leaking on device

While it seems to not pose a problem on the simulator, using performSelectorInBackground on the device causes memory leaks. Or at least that's what Instruments indicates. Looking at the code I don't have a single clue what the cause could be. I tried to strip the affected code to a bare minimum but still strangely Instruments keeps show...

Objective-C method implementation nuances

I have just started to develop for the iPhone and am in the process of learning Objective-C. I have seen some code that implements a method in the @implementation side of a class like this: -(void)myMethod; { // method body } What makes this interesting is that there is no mention of myMethod in the @interface for the class. I trie...

How to make the Number view in keyboard UITextField to become default?

I have a UITextField but my users will prefer enter some number in that field rather than typing text character (like enter a cost a product). So, how can I make the Number View in the keyboard to become default whenever the user tap into the UITextField? ...

Extra retain counts after initWithNibName

I have extra retain counts after calling initWithNib. What could cause this? (There are no referencing outlets in the nib) StepViewController *stepViewController = [[StepViewController alloc] initWithNibName:@"StepViewController" bundle:nil]; [self.navigationController pushViewController:stepViewController animated:YES]; [stepViewContro...

scaling in chipmunk physics engine

i don't know how to scale the UIiMageview class object in chipmunk engine i used snap code as example ...

Memory Leak question

I am having a memory leak issue with the following code. As much as I can tell I don't see why the problem persists but it still does not release when called. I am detecting the problem in instruments and the following code is keeping its "cards" classes alive even when it should had released them. Any help welcome. ... ... -(id)init...

iphone app emoticons

Hi, I have made an iphone application that allows users to send text messages for free to any mobile. I want to allow users to add emoticons into their message from standard set provided by me. What might be the best possible solution for this scenario? regards ayaz Alavi ...

What is the cost of a #define?

To define constants, what is the more common and correct way? What is the cost, in terms of compilation, linking, etc., of defining constants with #define? It is another way less expensive? ...

How to get cell text based on indexPath?

I have a UITabBarController with more than 5 UITabBarItems so the moreNavigationController is available. In my UITabBarController Delegate I do the following: - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { //do some stuff //... UITableView *moreView = (UITab...

how to udate window controls(NSTextField,NSCheckbox and etc) in binding manually

Hi, I am working on an application in which i need to store all the NSObject subclass properties into plist file and then allow users to store it and restore it. We call it profile and it can restore the saved state of all the controls/views on the window in my application. I have completed the storing/Restoring part, but the issue is ...

Must a view controller always have a delegate in iPhone apps?

I'm learning how to develop my own iPhone apps but I'm having a tough time understanding certain concepts. First, am i right to say that for every view, there must be a view controller for it? And for every view controller, must there be a delegate for it? Also, what is the role of mainWindow.nib? Most of the tutorials that i've read d...

what else text editors can be used to editor Objective-C code except xcode.

I am new to mac, my question is what else text editors can be used to edit Objective-C code except xcode. And which one is the best for productively editing source code? ...