[ios] Changed navigation bar's image.

This commit is contained in:
VladiMihaylenko 2016-02-11 16:15:13 +03:00 committed by Sergey Yershov
parent 9143a76fcf
commit c5d5981f17
6 changed files with 4 additions and 27 deletions

View file

@ -221,12 +221,12 @@ typedef NS_ENUM(NSUInteger, BookmarkDescriptionState)
- (UIButton *)backButton
{
UIImage * backImage = [UIImage imageNamed:@"NavigationBarBackButton"];
UIImage * backImage = [UIImage imageNamed:@"ic_nav_bar_back"];
CGFloat const imageSide = backImage.size.width;
UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., imageSide, imageSide)];
[button setImage:backImage forState:UIControlStateNormal];
[button addTarget:self action:@selector(backTap) forControlEvents:UIControlEventTouchUpInside];
button.imageEdgeInsets = UIEdgeInsetsMake(0., -imageSide, 0., 0.);
button.imageEdgeInsets = UIEdgeInsetsMake(0., -32., 0., 0.);
return button;
}

View file

@ -5,12 +5,12 @@
- (void)showBackButton
{
UIImage * backImage = [UIImage imageNamed:@"NavigationBarBackButton"];
UIImage * backImage = [UIImage imageNamed:@"ic_nav_bar_back"];
CGFloat const imageSide = backImage.size.width;
UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., imageSide, imageSide)];
[button setImage:backImage forState:UIControlStateNormal];
[button addTarget:self action:@selector(backTap) forControlEvents:UIControlEventTouchUpInside];
button.imageEdgeInsets = UIEdgeInsetsMake(0., -imageSide, 0., 0.);
button.imageEdgeInsets = UIEdgeInsetsMake(0., -32, 0., 0.);
UIBarButtonItem * leftItem = [[UIBarButtonItem alloc] initWithCustomView:button];
self.navigationItem.leftBarButtonItem = leftItem;
}

View file

@ -1,23 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "ic_back.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "ic_back@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "ic_back@3x.png"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B