objective-c

Universal preference pane is forced to launch on 32-bit

I'm building a Preference Pane for an application, it's Universal (PPC/32-bit/64-bit) but when I install it on the System Preferences, i'm forced to run it on 32-bit. Any idea why and how to solve it? if i run file FILE_PATH i get: FILE_PATH: Mach-O universal binary with 3 architectures FILE_PATH (for architecture x86_64): Mach-O 64...

NSThread, AsyncSocket and object deallocation

Hi! I have a piece of network code that uses AsyncSocket but moves it to a separate runloop. I'm creating this runloop with the following piece of code: [NSThread detachNewThreadSelector:@selector(_workerLoop) toTarget:self withObject:nil]; and here's how my _workerLoop looks like (they're both in the same class): -(void)_workerLoop...

What's wrong with this Objective-C threading code for my iPhone app?

This piece of code: - (IBAction) getXML { goButton.enabled = NO; [self performSelectorInBackground:@selector(parseInBackground) withObject:nil]; } - (void)parseInBackground { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; xmlParser = [[XMLParser alloc] init]; NSURL *xmlurl = [[NSURL alloc] initWithStrin...

iPhone Swapping out content of UIView/Sub view

I'm trying to accomplish the following: Swap out the content of a UIView or Subview using UIButtons or a toolbar. I have a view laid out like the illustration below. I want to swap out the content of the "UIView to swap" sub view by clicking on buttons or buttons on a toolbar. So you click button 1 and a view is loaded into the "UIView...

Three20's UIKit extensions don't seem to be being "included" properly

So, we have a project using the Three20 Library from Facebook (http://github.com/facebook/three20), and we're trying to compile against the latest version (HEAD from Github). Previously it's worked fine, but something has now changed :) The error I'm getting is an unrecognized selector on TTTableViewController: [TTViewControllerSubCl...

Is it possible to delay setAnimationDidStopSelector?

I have made a UIImageView, added it to the subview, and plan to animate it. I am using the setAnimationDidStopSelector method and was wondering if I could get it to call a function 3 or so seconds after the animation stops. Here is the current line of code I am using: [UIView setAnimationDidStopSelector:@selector(onAnimationComple...

Difference between class property mVar and instance variable self.mVar

I'm some what confused as to the difference between accessing an instance variable via self or just by name (when working inside the class). For instance, take this class: .h: @interface Register : NSObject { NSString *mName; } - (id) initWithName:(NSString *) name; .m: - (id) initWithName:(NSString *)name { if (self == [supe...

TextView length.

I need to know one thing - is there is a limit for the charecters in the textview? Actually in my application when I am entering the text continuously at some point it doesn't taking any characters. Anyone's help will be appreciated. Thank you. ...

how to stop tabbarcontroller from being reset view controllers?

Hello, i have an application with tabbarcontroller.I have 4 tabs+4 navigation controllers.i am pushing views on navigationcontroller's stack on first tabbar button item's navcontroller,my problem is if i again push tabbar button it shows first view of navigation controller while it should show the last view of navigation controller.Here...

how to declare a global variable in Objective-C?

// MyClass.h @interface MyClass : NSObject { NSDictionary *dictobj; } @end //MyClass.m @implementation MyClass -(void)applicationDiDFinishlaunching:(UIApplication *)application { } -(void)methodA { // Here i need to add objects into the dictionary } -(void)methodB { //here i need to retrive the key and objects of Dictionary into a...

Making cocoa application scriptable

I am new to cocoa development Can any one please tell me how I can make my cocoa application scriptable. I want my application to perform certain actions,in response to scripts. I could not find easy guide or help. ...

i want to add the set setBadgeValue in my tab bar in objective-c ?

this is my code that i am using for this but i am getting the only the tab bar, no badgevalue on second item of tab bar tabBarController = [[UITabBarController alloc] init]; navigationController = [[UINavigationController alloc] init]; navigation1Controller = [[UINavigationController alloc] init]; navigation2Controller = ...

hwo i trimming the digit s from my NSSMutable string in iphone using objective-C?

I was written an http request in objective-C i got reply from this method are 200,8,"7 Infinite Loop, Cupertino, CA 95014, USA" I want to catch Cupertino, CA words from it. Therefore i was written: NSArray *myArray = [result5 componentsSeparatedByString:@","]; NSLog(@"Response: %@", myArray); NSString * state = [[myArray objectAtInde...

Weird symbols from NSXMLParser

I'm stuck with a problem; everything I try to parse with the NSXMLParser ends up with "†Êá"(name of element, elementText ...) I tried different sources (the one I'd like to parse from my server, simple NSString, and from different sources from the web which deliver XML) and every time "†Êá". //prepar request //NSString *urlString = [NS...

Can't use IBActon for button on after installing iPhone SDK 3.2

I have no idea what happened after installing this update ... I can't do this most simple thing which I've been using for a long time. Does anyone have the same problem as I do? ...

Help needed with AES between Java and Objective-C (iPhone)....

I am encrypting a string in objective-c and also encrypting the same string in Java using AES and am seeing some strange issues. The first part of the result matches up to a certain point but then it is different, hence when i go to decode the result from Java onto the iPhone it cant decrypt it. I am using a source string of "Now then a...

iPhone: Setting Navigation Bar Title

Hey all. I'm still pretty new to iPhone development, and I'm having a bit of trouble figuring out how to change the title of my Navigation Bar. On another question on this site somebody recommended using : viewController.title = @"title text"; but that isn't working for me...Do I need to add a UINavigationController to accomplish th...

How do I launch a non-document-based Cocoa application by dropping files on it?

The only way I've been able to get this working is with a document-based application (which this app isn't). In my non-document-based application I've defined the supported Document Types (from the Properties tab of the Target info window) and my AppDelegate implements application:openFile: and application:openFiles:. That enables droppi...

Which iPhone UI Element is the Mail using?

How can I create the textfield that can accept image and text like the mail apps does? ...

UITableView editable (rearrangeable) without cells beeing deletable...

Hi there. I was wondering if there is a way to make a UITableView editable in a way where the user is able to rearrange (move) individual TableViewCells, BUT without the "Remove-Cell"-Feature to appear. thank you for your help sam ...