UIButton *delBtn = self.delBtn;

    [delBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];

    delBtn.backgroundColor = [UIColor redColor];

    delBtn.layer.backgroundColor = [UIColor redColor].CGColor;

    delBtn.layer.borderColor = [UIColor blackColor].CGColor;

    delBtn.layer.borderWidth = 1.0f;

    delBtn.layer.cornerRadius = 10.0f;


http://stackoverflow.com/questions/2808888/is-it-even-possible-to-change-a-uibuttons-background-color






Posted by tenn
,

[objc] UIActionSheet

iPhone 2013. 4. 20. 14:36






UIActionSheet * actionSheet = [[UIActionSheet alloc]initWithTitle:@"Setting" delegate:self

                                                    cancelButtonTitle:@"Cancel"

                                               destructiveButtonTitle:@"Delete"

                                                    otherButtonTitles:@"1",@"2", nil];

    

[actionSheet showInView:self.view];




Posted by tenn
,



UIBarButtonItem *btn = ..


btn.title = @"\u2699"; 

UIFont *f1 = [UIFont fontWithName:@"Helvetica" size:24.0]; 

NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:f1, UITextAttributeFont, nil]; 

[btn setTitleTextAttributes:dict forState:UIControlStateNormal];



http://stackoverflow.com/questions/9755154/ios-uibarbuttonitem-identifier-option-to-create-settings-cogwheel-button





Posted by tenn
,