I want to have rounded corners and shadow on a UIBarButtonItem.
UIBarButtonItem
UIButton *useButton = [UIButton buttonWithType:UIButtonTypeCustom];
buttonName.layer.cornerRadius = 2; buttonName.layer.borderWidth = 1; buttonName.layer.borderColor = [UIColor blacColor].CGColor;