Top "Objective-c-runtime" questions

The Objective-C runtime is a runtime support library provided with an implementation of the Objective-C language.

How can I add properties to an object at runtime?

Is it possible to add properties to an Objective C object at runtime?

objective-c cocoa properties objective-c-runtime
Convert a string ("MyExampleClass") into a class name (MyExampleClass)

I want to convert a string to a class name. Imagine that I have a string, which changes, containing a …

objective-c cocoa objective-c-runtime
Method cannot be marked @objc because its result type cannot be represented in Objective-C

am exposing swift API's in Objective-C and the Objective-C runtime. When i add "@objc" before the function throws an error "…

ios objective-c swift optional-parameters objective-c-runtime
Why shouldn't you use objc_msgSend() in Objective C?

The Objective C Runtime Guide from Apple, states that you should never use objc_msgSend() in your own code, and …

objective-c cocoa objective-c-runtime
Change enum values at runtime?

Is there a way to assign values to enums during runtime in objective c? I have several enums and want …

objective-c ios enums objective-c-runtime
Intercept Objective-C delegate messages within a subclass

I have a subclass of UIScrollView in which I need to internally respond to scrolling behaviour. However, the viewcontroller will …

ios objective-c objective-c-runtime
How do I list all fields of an object in Objective-C?

If I have a class, how can I list all its instance variable names? eg: @interface MyClass : NSObject { int myInt; …

objective-c class introspection objective-c-runtime
Objective-C: preferred way to retrieve the superclass of a Class instance

I am wondering which of the two following methods is the correct or preferred one to retrieve the superclass of …

objective-c objective-c-runtime
objective-c runtime error "Use of undeclared identifier 'objc_property_t'"

I'm trying to get the properties from my class using obj-c runtime approach I found on the answers from here, …

objective-c objective-c-runtime