iOS: UIButton titleLabel — does it do anything at all?
问题 I want to make a UIButton with type UIButtonTypeCustom (for the shape). I want to assign the title using button.titleLabel because I need to specify the font. The following code looks like it should work, but doesn't -- no label shows up, period. UIImage *editButtonImage = [UIImage imageNamed: @"editButton.png"]; float width = editButtonImage.size.width; float height = editButtonImage.size.height; UIButton *editButton = [UIButton buttonWithType: UIButtonTypeCustom]; editButton.frame =