I understood the answer to this question, but I could not find a solution here, so I am sending it to posterity.
So, in Objective-C, how do you create an object from a pointer to store it in objective-c collections (NSArray, NSDictionary, NSSet, etc.) without returning to regular C?
NSValue *pointerObject = [NSValue valueWithPointer:aPointer];
This will wrap the pointer in NSValue. To return it later, use the NSValue instance method (pointerValue :)
, , / , .
NSValue, .
- :
@interface FooPtr:NSObject { void *foo; } + fooPtrWithFoo: (void *) aFoo; .... methods here ... @end
(void *), : " ". - #define FOOPTR(foo) ((Foo *) foo) FOOPTR(foo)->bar; .
#define FOOPTR(foo) ((Foo *) foo)
FOOPTR(foo)->bar;
Objective-C . - . / foo ..
Source: https://habr.com/ru/post/1745833/More articles:Любой, кто использует ASP.NET MembershipProvider с Nhibernate? - c#Wrong number of arguments passed: repl $ repl - clojureGood way to format decimal in SQL Server - decimalhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1745831/jquery-now-creating-an-object-and-storing-values-in-it-to-pass-to-an-ajax-call&usg=ALkJrhjC-12rvyb7yreMpc-HBz2CYRQvDwMoving CSS horizontal scroll using jQuery slider - javascriptASP.NET jQuery validation - jqueryGrouping records by subsets of SQL - sqlbash argument analysis tools - bashUnable to change target processor to x86 or x64 in Visual Studio 2005 - cpuRails delayed_job sends email as HTML - emailAll Articles