I want to pass a variable to a UIButton action, for example
NSString *string=@\"one\";
[downbutton addTarget:self action:@selector(action1:string)
forCo
You can extends UIButton and add a custom property
//UIButtonDictionary.h
#import
@interface UIButtonDictionary : UIButton
@property(nonatomic, strong) NSMutableDictionary* attributes;
@end
//UIButtonDictionary.m
#import "UIButtonDictionary.h"
@implementation UIButtonDictionary
@synthesize attributes;
@end