mardi 5 mai 2015

IOS Bar button is incorrect size

I have UIBarButton image that isn't working. It shows up in the right spot but the image is super duper zoomed in. why? The sizes of the image for 1x 2x and 3x are 22x22, 44x44, 66x66 respectively.

UIBarButtonItem *addFriendBarButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"add friend button"]
                                                                       style:UIBarButtonItemStylePlain
                                                                      target:self
                                                                      action:@selector(transitionToAddFriends)];
self.navigationItem.rightBarButtonItem = addFriendBarButton;

Aucun commentaire:

Enregistrer un commentaire