How can I change UIButton title color?

You can use -[UIButton setTitleColor:forState:] to do this. Example: Objective-C [buttonName setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; Swift 2 buttonName.setTitleColor(UIColor.blackColor(), forState: .Normal) Swift 3 buttonName.setTitleColor(UIColor.white, for: .normal) Thanks to richardchildan

Detecting which UIButton was pressed in a UITableView

In Apple’s Accessory sample the following method is used: [button addTarget:self action:@selector(checkButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; Then in touch handler touch coordinate retrieved and index path is calculated from that coordinate: – (void)checkButtonTapped:(id)sender { CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView]; NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition]; if (indexPath != nil) { … } }

How to change font of UIButton with Swift

Use titleLabel instead. The font property is deprecated in iOS 3.0. It also does not work in Objective-C. titleLabel is label used for showing title on UIButton. myButton.titleLabel?.font = UIFont(name: YourfontName, size: 20) However, while setting title text you should only use setTitle:forControlState:. Do not use titleLabel to set any text for title directly.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)