objective-c

How can I remove the resize corner from an NSPanel that is an HUD Window

I'm trying to remove the resize corner from an NSPanel HUD styles. This is what I'm trying right now. NSUInteger currentStyleMask = [somePanel styleMask]; [somePanel setStyleMask: currentStyleMask | !NSResizableWindowMask]; I also get a warning that NSWindow may not respond to setStyleMask and it isn't defined in NSWindow.h, however i...

Nested functions are disabled - why do I get this error message?

When I accidentally wrote: UIViewController tmp*=_currentViewController; Instead of: UIViewController *tmp=_currentViewController; I get a nested functions are disabled error. Can you explain this? ...

TTThumbView/TTPhotoView no autorotation

Hi, In my app I try to use the TTphotoView, so in a ViewController I push the TTphotoView with my navigationController like this: if(self.photoViewController == nil { PhotoViewController *viewController = [[PhotoViewController alloc] init]; self.photoViewController = viewController; viewController.hidesBottomBarWhenPushed = YE...

Best way to handle and report memory allocation errors due to integer overflow in Objective-C?

To begin with, let me say that I understand how and why the problem I'm describing can happen. I was a Computer Science major, and I understand overflow/underflow and signed/unsigned arithmetic. (For those unfamiliar with the topic, Apple's Secure Coding Guide discusses integer overflow briefly.) My question is about reporting and recov...

MY XCode datatips are not showing up

I've got a little problem and I'm hoping someone here can help me out. I've used XCode pretty regularly for a while now and have made plenty of use of the Debugger datatips. All of the sudden today on a new project that I am working on, they are not there. The setting is toggled on under the Run->Debugger Display->Datatips menu, but they...

commit object to next TableViewController

i got a tableview controller. if a cell is selected i perform the following: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ablogSingleCatTableViewController *singleCatTableViewController = [[ablogSingleCatTableViewController alloc] initWithStyle:UITableViewStylePlain]; // Push the detail...

Objective-C / Cocoa: Uploading Images, Working Memory, And Storage.

Hello. I'm in the process of porting an application originally in java to cocoa, but I'm rewriting it to make it much better, since I prefer cocoa a lot anyway. One of the problems I had in the application, was that when you uploaded images to it, I had the images created, (as say an NSImage object) and then I just had them sitting in ...

Objective C - Problem with objectForKey

Okay, I'm trying to write a high score function for my app. My problem is that when no high score has been saved yet, my program crashes. If I save it with: [[NSUserDefaults standardUserDefaults] setObject:@"[given string]" forKey:@"firstName"]; first, it works fine. However, if I start up the program for the first time and try to ...

Cocoa window position anomaly

Hello everyone, I have a weird problem with positioning a window on screen. I want to center the window on the screen, but i don't know how to do that. Here's what i've got. The window is created from nib by the main controller: IdentFormController *ftf = [[IdentFormController alloc] initWithWindowNibName:@"IdentForm"]; [[ftf window] m...

Three Objective-C constructor questions

I have three quick questions I've seen conflicting answers to that hopefully someone can clear up. Does [super init] need to be done all the way down to NSObject? (e.g if Foo inherits from NSObject, should Foo call [super init]? If not, does that hold for dealloc too? Does any form of default-initialization occur for member variables i...

Why does viewDidLoad wait before updating the UI?

Hello fellows. I'm just trying to get my head around the Objective-C event model on iPhone, and by the looks of things I have fundamentally misunderstood something here. For the purpose of experimentation, in a view controller's -viewDidLoad method, I am setting a UILabel's text, then sleeping for two seconds, and then changing the labe...

Jumping effect on Mac OS X and iPhone

Hello guys! There is an animation when something gets done in Mac OS X. You know the animation on dock, when an icon is jumping. Is there a way to do this on iPhone with a UIButton? If yes, please give me the start. I know a way with cocos2D, but I think it can be done with core animations too. Thanks in forward! ...

How to Create SMS application in iPhone

I am new to iphone development, i want to create SMS application in my application.I have created mail application using "messageUI.framework".Is there any framework for creating SMS application.I have no idea of it, so tell me the way of approaching this task. Please guide me to achieve my task.Please help me out.Thanks. ...

custom template Logo & description. in iPhone Application Templates

I am trying to create a custom "Application template". I tried to learn, "How to create template?" from the sample templates of "Cocos2d iPhone Game development". The problems that I am facing are as follows. => Cocos2d custom application templates have logo - "create new project" screen. ( I don't know, how to place the default lo...

How to update a detailView in a splitViewController?

Hello, I'm trying to update a detailView in a splitViewController. This is what I try: //Get the application delegate AppDelegate *delegate = [[UIApplication sharedApplication] delegate]; //Get the masterViewController MasterViewController *master = [delegate.splitViewController.viewControllers objectAtIndex:0]; This seems to work f...

IBAction methods declared in a Protocol are not visible in Interface Builder

Hi, I have defined an objective-c protocol that declares a method that is tagged with IBAction. I implemented a UIViewController that implements the protocol. In Interface Builder I created a nib file with the UIViewController as the file's owner. However the protocol method is not visible under the Received Actions section although it...

Implementing URL Shorteners in my iPhone Application

How do I implement is.gd's URL shortening API in my iPhone Application? ...

How to increase the height of the cell in a tableview in iphone?

I am new to iphone development.I am parsing a xml file and displaying the title, date, view and summary in each row of a table.The contents of summar is big ,so only first 3 words are displayed in the cell.How can i increase the height of the row with respect to the length of the contents.All the content should fit properly inside the ...

What is "float_t" for?

Should I be using float_t instead of float? ...

Performance issues with NSMutableArray and NSArray

I've been programming C/C++ for 20 years but I'm new to objective-c and Coco and have some questions about the performance of NSMutableArray and NSArray. I need an container much like the stl list container, but coco doesn't seem to have one and inserting and removing elements from the middle of MSMutableArray seems slow, but treating ...