Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [self.button setImage:[UIImage imageNamed:@"arrow-down"] forState:UIControlStateNormal];
- CGFloat titleWidth = self.button.titleLabel.bounds.size.width;
- CGFloat imageWidth = self.button.imageView.bounds.size.width;
- // Title is left Image is right
- self.button.titleEdgeInsets = UIEdgeInsetsMake(0, -imageWidth, 0, imageWidth);
- self.button.imageEdgeInsets = UIEdgeInsetsMake(0, titleWidth, 0, -titleWidth);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement