Hi,
Is it best to have static constructors where you alloc the instance in the constructor and you return the instance as auto release, e.g. [String stringWithFormat...] or is it best to have dynamic constructors where you ask the user to alloc first so that he is in charge of releasing? When should you use each?
Cheers
...
I'm writing an app, that automatically finds peers running the same app, so I need the Bluetooth-device.
But because of app-restrictions I'm not allowed to use the private framework to enable, or activate the Bluetooth-device.
I'd rather avoid a pointless searching for peers if there's no possibility of finding them.
Is there any way to...
Hi,
I'm searching for a Objective-C method like PHP's explode function:
$string = "Helle#world#!";
$delimiter = "#";
$array = explode ( $delimiter, $string);
Result: $array = {"Hello", "world", "!"}
Thanks,
Andreas
...
I would like to connect microsoft database via iPhone, is that possible to do so? Is there any third party library required? If not, any suggestions on that?? Thank you.
...
H guys,
I need to validate an email address which was in the format [email protected]
As I am new I dont know how to validate the email address.
Please guys suggest me how to get out of this.
Hope I will get quick response from you guys.
Thanks in advance,
Monish.
...
I am just starting with iphone programming. I used the utility application project template. A button on the main view of the utility application calls another view which shows some data. At the end of the presentation of the data a "end" view is shown. The "end" view contains a button to return to the main view. This all works grea...
I've got to deal with UIWebView embedded into UIScrollView.
How do I handle the link touch, for ex. ?
...
My situation is the following:
We're creating an application that (among other things) shows data from the Public Folders in Exchange. We'd like our iPhone App to display contacts like the iPhone does it by default (like Apple's AddressBook app), therefore we're making use of the AddressBook API. However, we don't intend to save any dis...
Hello,
So I am trying to probe the UIApplicationLaunchOptionsURLKey to see if my application was launched by another app. For example, what if I want to do something like this:
if (UIApplicationLaunchOptionsURLKey != NULL) {
[window addSubview:launchViewController.view];
} else {
[window addSubview:viewController.view];
}
In...
view2 is a subclass of UIViewController. view1 is a subclass of UIView.
How do I launch view1 from view2?
I've tried
[self dismissModalViewControllerAnimated:YES];
and
UIViewControllerhandler.hidden=YES;
...
Although I wouldn't have written it myself, what is the expected result of the following statement where A (guaranteed to zero or positive integer) is greater than 1?
return A || 1;
In many languages, I would expect A to be returned, unless the value of A is zero, in which case 1 would be.
I don't have my C book to hand, but I note ...
How can I get a NSTextField (or any object) to respect the autoresizing options below via code? I want to add new objects to the view dynamically, but when I increase the height of the view, they are anchored to the bottom left, as opposed to the top left as shown, and so new textfields are dropped on top of the old ones.
Is this even p...
Hello,
I added a UITabBarController to my ViewController in IB, and created an iVar in the View Controller's class that is hooked up to the tabbarcontroller. I add the tabs in my viewDidLoad method, but the text and images for the tab bar items don't appear until they are clicked on.
Any idea why this happens?
...
I am working on the iTuneU Stanford iPhone course HelloPoly drawing assignment, and I am getting a call to my object's init routine when I don't expect one. The callback seem to indicate that the call is coming from _loadMainNibFile (after other calls). What I am trying to understand is why is my object being init-ed implicitly. The sour...
In the Xcode documentation for NSCopyObject, the special considerations section states:
This function is dangerous and very difficult to use correctly. It's use as part of copyWithZone: by any class that can be subclassed, is highly error prone. Under GC or when using Objective-C 2.0, the zone is completely ignored.
This functio...
I use an NSFetchedResultsController to populate a UITableView, and would like to know if it is possible to create different sections based on an attribute of my data model.
I am displaying a table of objects, and one of the properties of the objects is a BOOL that is set to indicate whether or not the object is active. I would like to ...
I have a PDF file with a font reference to STSong-Light which is not available on the iOS.
Therefor I can not display the correct characters defined with that font.
I took the STSong font file mentioned on Apples KB:
http://support.apple.com/kb/ht1538
… and put it into my project and added it to the plist.
The text is now no longer b...
I got this crash:
"this class is not key value coding-compliant for the key view."
And I have no idea what its talking about. Could someone help?
...
Hi guys,
I'm converting my App Delegate file from .m to .mm (Objective-C to Objective-C++) so that I can access a third-party library written in Objective-C++. In Objective-C, my app delegate builds and runs fine. But when I change the extension, the project builds and I get link errors, all of which are missing symbols from a static li...
Hello,
I was wondering what the difference was between the following values in objective c:
TRUE(uppercase) - true(lowercase) - yes
FALSE(uppercase) - false(lowercase) - no
they are colored differently in the IDE, are there different situations when you would use the different boolean values?
Thanks
...