NSString is empty
How do you test if an NSString is empty? or all whitespace or nil? with a single method call? ...
How do you test if an NSString is empty? or all whitespace or nil? with a single method call? ...
I have class called AppController which contains a mutable array of Person objects called people. Each person simply has an NSString and a float. I also have an NSArrayController whose contentArray is bound to the people array in AppController. Then I have the usual setup of a table view bound to the array controller to show a list of ...
I have a Class (but no instance) and need to know if it conforms to a certain protocol. However, Class can be subclassed several times and class_conformsToProtocol() ignores protocols declared on superclasses. I could just use class_getSuperclass() and recursively check all the classes in the hierarchy upwards until the superclass is ni...
I'm trying to get my head around memory management in Objective - C. I've used the garbage collector up until this point but before I go forward I'd like to get a better understanding of manually managing memory. I'm aware that I don't have an implementation of a dealloc method in this code. My question is why does my inputString variab...
How do you save a value from a text feild so that can be saved and displayed later, on a differnt opening. ...
I want to detect the very first time my view is displayed. After that, I wan't to forget about it. Where can I set a BOOL to do this? ...
Hi, if i have an NSString eg-> string(102)"?xml etc How to remove all chars upto and including the double quote. I want to remove the string(102)" Doing this NSString* newString = [str substringFromIndex:13] works but is not ideal ...
I have an interesting problem. I am loading a UITableView asynchronously. I am trying to get the count: prefs = [NSUserDefaults standardUserDefaults]; NSInteger dmCount = [prefs integerForKey:@"dmCount"]; NSLog(@"items count %d", [self.items count]); if (abs([self.items count] - dmCount) > 0) { [prefs setInteger:abs([self.items...
if I release a variable more than it should be, would that be a problem? I cannot determine the retain count ahead of time. ...
Is there an objective c version of text delimiters?? Here's the applescript code: set oldDelim to AppleScript's text item delimiters set AppleScript's text item delimiters to "Jarvis>" set charliePlainOutput to (what ever needs to be parsed) set charlieUnmoddedOutput to last text item of charliePlainOutput set charlieOutputFiltered to...
So I have this: NSData *charlieSendData = [[charlieImputText stringValue] dataUsingEncoding:NSUTF8StringEncoding]; I know how to convert NSStrings to data but how I convert data back to an NSString? Elijah ...
I tried to use - (BOOL) shouldAutoRotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation { if(interfaceOrientation == UIInterfaceOrientationPortrait) { return YES; } } but it doesn't change anything in a standard movie player. Screen rotates to landscape mode automatically and movie player does not re...
Hi, everyone, I am writing an iPhone application, which contains a function. It can convert the NSMutableArray to a CSV file. However, I don't know how to do. Can anyone help me to do this? Thank you very much. // ------ Update ----- Thank you for everyone reply. Actually, the array contains the objects of the elements, but I can co...
I think I've found some gems in the iPhone OS (iOS 4). I found that there're 128-bit, 256-bit, 512-bit and 1024-bit integer data types, provided by the Accelerate Framework. There're also Apple's implementation of Basic Linear Algebra Subprograms (BLAS), Apple's implementation of LAPACK (Linear Algebra PACKage), and Digital Signal Proce...
Hi Guys I am having one doubt using VMWare Server. I have developed applications using VMWare Server. Can i upload these applications to App Store? Is there any chance to apple that it can find the application is developed in VMWare Server and apple will reject this applications? Can any one please tell me? ...
I have a UITextView which I call resignFirstResponder on when the return key is hit. The text view does resign first responder (the flashing cursor thing in the text box goes away), but the keyboard sometimes won't go away. What could be causing this problem? Thank you! ...
I'm working on a table view that will display all of a certain type of managed object, and I'm wondering if I should be doing something to prevent faults from firing all the time when the user scrolls and I set up a new cell in the data source? I don't know too much detail about large amounts of managed objects, (several hundred) but I ...
Hey everyone, I am writing a simple console application in Objective-C but I have heard that this coding may be loosely applied to some C as well, so I wanted to make that clear. I am having a slight problem however, when I run from the Debugger in Xcode, for some reason, my program does not wait for user input, it just rolls right on t...
Hi. Does anyone know of open source code available to implement a popup to the user after so many days or so many instances of the app to prompt the user to rate and review the app on the app store? I've seen this already with a few apps I own. Thanks in advance for your help. ...
Hi. I've been racking my brain for a bit trying figure out what's the cleanest way to handled failed authenication using delegation with the MGTwitterEngine. Is this the correct usage of the connectionIdentifier or just hacked? - (void)initiateCredentialCheckWithUsername:(NSString *)username password:(NSString *)password { self.au...