Why does NSInvocation getReturnValue: lose object?
问题 I need your help. I have some problems with NSInvocation 'getReturnValue:' method. I want to create UIButton programmatically, and even more, I want to create it dynamically using NSInvocation and through passing value through the NSArray (that's why I wrapped UIButtonTypeRoundedRect). Listing. NSLog(@"Button 4 pushed\n");//this code executed when button pushed Class cls = NSClassFromString(@"UIButton");//if exists {define class},else cls=nil SEL msel = @selector(buttonWithType:); //id