Tag: Objective-C
Objective-C is a high-level programming language used primarily for developing software on Apple’s macOS and iOS platforms, known for its object-oriented capabilities and dynamic runtime.
-
Objective C: selector in NSDictionary speichern und wieder auslesen
SEL ist einfach ein Pointer, der sich als NSValue speichern lässt: NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: [NSValue valueWithPointer:@selector(foo)], @"foo", nil]; Zum Auslesen des Selectors hilft folgender Code: SEL aSel = [[dict objectForKey:@"foo"] pointerValue];
-
NSString to NSData / NSData to NSString
Helpful snippets to convert NSString to NSData and NSData to NSString: NSString to NSData NSData to NSString