Linked Questions

15 votes
2 answers
3k views

I am trying to call a method on super class inside a block. In order to avoid a retain-cycle I need a weak reference to super. How would I get a weak reference to super? [self ...
aryaxt's user avatar
  • 77.9k
5 votes
4 answers
7k views

Hi im new to objective C and was wondering if someone might be able to help me with this. I have a few different methods each requiring 3 input values and normally call it using [self methodA:1 ...
tomo's user avatar
  • 93
3 votes
3 answers
4k views

It seems that in Xcode 4 there is no longer a way to create an application that is not limited to the command line using C or C++. I would like to do so, however Glut seems to be one of the only ...
William Oliver's user avatar
8 votes
3 answers
7k views

Okay, I've read half a dozen threads on this subject, but none of the solutions appear to address exact needs. Question: How does a Pure C (.c) function call a method inside a Pure Objective-C (.m) ...
Mark Löwe's user avatar
1 vote
3 answers
1k views

I currently use objc_msgSend to invoke such selector on collection of object. Is there any better way to do that? Here is my code: @protocol ADelegateProtocol { -(void) timeToEventOneDidChange:(...
Piotr Czapla's user avatar
  • 26.8k
4 votes
1 answer
989 views

I have a problem related to objc_msgSend runtime call, when I have method which returns some union. I'm calling objc_msgSend function via libffi, and if I have union which is smaller than 16B ...
user232343's user avatar
  • 2,118
1 vote
1 answer
941 views

I have an object and a selector to invoke on said object. The selector will take one of 4 forms (modelled to be similar to the target-action pattern): -(void)selectorWithZeroArguments; -(void)...
Benedict Cohen's user avatar
1 vote
1 answer
522 views

What are the two implicit parameters passed to every method by an object in Objective-c? Is it _cmd and id?
A J's user avatar
  • 605
1 vote
1 answer
1k views

I want to callback an objective c method from c. //c int gameEngineCallback(int buttontype,void (*callback)(void)) //using above function gameEngineCallback(roundButton,callback); //this works ...
Hassy31's user avatar
  • 2,813
0 votes
3 answers
285 views

I'm trying to call a method implemented in Obj-C from C code as follows: // MainViewController.m - (void)Test { [self outputLine:@"Called from MyCode.c"]; } . . . cFunc(id param); . . . // ...
eagle_bear's user avatar
0 votes
2 answers
530 views

I know that I can call a class method like [MyClass myMethod]; by doing [NSClassFromString(@"MyClass") performSelector:@selector(myMethod)]; I'm currently trying to do this however: [MyClass ...
TAH's user avatar
  • 6,130
0 votes
1 answer
261 views

I'm developing an app that needs to perform some swizzling. I'm swizzling a method -(void)m1:(CMAcceleration)a; with another one that I provide. -(void)newM(id self, SEL _cmd, ...){ va_list args; ...
Leonardo Marques's user avatar
-2 votes
3 answers
123 views

if SEL fun is a parameter how can I go this fun? for example -(id)init:(SEL)fun { [target fun]; }
user1052163's user avatar
0 votes
1 answer
177 views

This works fine return [[DJLocalizationSystem shared] localizedStringForKey:(key) value: @"" table: nil bundle:bundle]; However, this does not work return objc_msgSend([DJLocalizationSystem shared], ...
Andy Darwin's user avatar