objective c - create instance of class with NSString -
I have always been called a method when creating a new instance of an object. So I need to create a loop that checks the existence of a new counter like a new counter and if it is found then make a new instant 2. How can you create a class from nsstring? The goal is to create those views which I can drag on those grid which represent the objects present in them. Here is the method that creates new objects and see
// method creates a visual with new stability. Icon - (IBAction) makeView: (ID) Sender {rectString = [NSString stringWithFormat: @ "0,120,% F,% f", pm.fixWidth, pm.fixHeight]; _try = [[stability mark alloc] init]; _try.fixImg = pm.fixImage; _try.name = pm.name; [Fix Controller addObject: _try]; _testBox = [[addObjectView alloc] initWithFrame: NSRectFromString (rectString)]; NSImageView * iconView = [[NSImageView alloc] initWithFrame: NSMakeRect (0, 0, 75, 75)]; TestView1Controller = [[NSViewController alloc] init]; TestView1Controller.view = _testBox; [_testboxcards: yes]; _testBox.layer.masksToBounds = Yes; _testBox.layer.cornerRadius = 2.0; _testBox.layer.borderWidth = 2; _testBox.layer.borderColor = [[Enscor dark gray color] CGColor]; // This content shows the window to add our Subview test box in [testView1Controller setView: _testBox]; [TestView1Controller Baindः @ "object to object" Oksifk controller Kepath: @ "content" option: zero]; [Main Wine Preview: _ TestBox]; NSTextField * obLabel = [[NSTextField alloc] initWithFrame: CGRectMake (0, 0, 50, 40)]; [ObLabel Bind: @ "value" toObject: testView1Controller withKeyPath: @ "representObject.Type" option: zero]; [ObLabel setBackgroundColor: [NSColor clearColor]]; [ObLabel setcable: false]; [ObLabel setEditable: false]; [ObLabel setBackgroundColor: [NSColor grayColor]]; [ObLabel setborded: false]; [ObLabel setTextColor: [NSColor whiteColor]]; [IconView bind: @ "value" toObject: capet with testView1 controller: @ "representObject.fixImg" option: zero]; // [_ testbox addSubview: obLabel]; [_testbox AddSubview: iconView];
I need new examples because I do not overwrite property values and lose my represented object data for each view.
id object = [[NSClassFromString (@ "NameofClass") alloc] init];
Comments
Post a Comment