sometime I encounter code that have , sometimes have *, can any one expand what is * and ** means in ObjectiveC, thz you. (I used to be a Java programmer, within experience in C/C++)
Is there a way to get the list of currently running threads in objective-C?
I'm mostly interested in getting the NSThreads objects, cause i want to replace the assertion handler for each running thread?
If such thing is not possible, maybe i could set my own selector to be invoked after any thread is spawn(so that i could do the assertion handler replacement over there)?
Are there any shortcuts to (stringByAppendingString:) string concatenation in Objective-C or shortcuts for working with NSString or other objects in general?
e.g. I'd like to make this:
NSString *myString = @"This";
NSString *test = [myString stringByAppendingString:@" is just a test"];
something more like this:
string myString = "This";
string test = myString + " is just a test";
Hi,
Does C# (WinForms) support adding a view or control to another control? Could anyone give me an example? Thanks in advance.
I use this code in Objective-C.
[aView addSubview:anotherView];
How to call a function in Objective C? For example:
I define the function in header (.h file):
-(void)abc
and implement this function in implementation file (.m file):
-(void)abc
{
//.....
///....
}
Now how would I call this function from where I need it?
Are there standard optimization tricks for Objective-C to make for faster execution along the lines of "inlining" frequent methods as in C++ or the "g++ -fast" tag?
Being an aspiring Apple developer, I want to get the opinions of the community if it is better to learn C first before moving into Objective-C and ultimately the Cocoa Framework?
My gut says learn C, which will give me a good foundation.
Hello.
I've been developing for Visual Studio and C# for a long time. Now, I'm developing with XCode and Objective-C.
On C# I can use /// <summary> to generate documentation. Is there any kind of mechanism like that on XCode to generate documentation? And what kind of comments should I use?
Thank you.
Where should I place utility methods in objective-c?
E.g. additional path handling utility methods which are called by multiple classes.
I have seen examples where they are placed in the main appdelegate file and are therefore available to all. This seems a bit weird to me though however...
I am making an iPhone app. I have a code that is in C. The C code contains a lot of pointers and global variables. I want to use this C code in my objective-c project. Can anybody please help me with this?
Hello Everyone,
What is the difference between "+" and "-" before the function name interface declaration in an Objective-C program. Example:
- (void)continueSpeaking;
(NSArray *)availableVoices;
What's the difference?
What is the best practice, even in general programming, when you have an undefined, possibly infinite, amount of items that you need in an array but don't have defined bounds. Can you define an endless array in objectivec that you can keep pushing items onto, like other lanaguages have a list item.
Thanks for any help.
Hi folks,
I know this is a mater of taste, but actually I cannot accept the Objective-c syntax.
Any advices so that I can go ahead and learn this language with this freak syntax?
Thanks.
Let's say I have this:
NSString *str = @"This is a sample string";
How will I split the string in a way that each word will be added into a NSMutableArray?
In VB.net you can do this:
Dim str As String
Dim strArr() As String
Dim count As Integer
str = "vb.net split test"
strArr = str.Split(" ")
For count = 0 To strArr.Length - 1
MsgBox(strArr(count))
Next
So how to do this in Objective-C? Thanks
How do you use Objective-C (iPhone) to send an AppleScript to a remote computer (on same network) to be executed?
I think something like NSNetService would be of use here, but I don't know.
Thanks!
I know Objective-C is just a superset of C, and you can use plain C anywhere. But am I able to use .m and .c files (for when there is only pure C) in the same project? Or all the errors I'm getting because of something else…
Thanks.
What are the IDE's or development tools best suited for projects involving ObjectiveC, C and C++? Is there a common IDE which would support all the three languages.
In Java, I may have a class, for example, "utility" ....., and I have a static method called "changeToCapitalLetter", so , I can do something like this:
Utility.changeToCapitalLetter(String myString);
How can I do the similar thing in Objective C? thz a lot.
So I thought that negative numbers, when mod'ed should be put into positive space... I cant get this to happen in objective-c
I expect this:
-1 % 3 = 20 % 3 = 0
1 % 3 = 1
2 % 3 = 2
But get this
-1 % 3 = -1
0 % 3 = 0
1 % 3 = 1
2 % 3 = 2
Why is this and is there a workaround?
Hi, is there anyway I can test if a method exist in Objective-C?
I'm trying to add a guard to see if my object has the method before calling it.
Thanks,
Tee