Ejemplo n.º 1
0
func (cls Class) Subclass(subclassName string) Class {
	class_id := C.objc_allocateClassPair(cls.cclass(), C.CString(subclassName), (C.size_t)(0))
	return (Class)(unsafe.Pointer(class_id))
}
Ejemplo n.º 2
0
func Runtime_objc_allocateClassPair(superClass unsafe.Pointer, name string, extraBytes int) unsafe.Pointer {
	var n *C.char = C.CString(name)
	defer C.free(unsafe.Pointer(n))
	return unsafe.Pointer(C.objc_allocateClassPair((*C.struct_objc_class)(superClass), n, (C.size_t)(extraBytes)))
}