Skip to content

Commit

Permalink
Merge pull request #4770 from vishalduggal/timob-15319
Browse files Browse the repository at this point in the history
[TIMOB-15319] Fix Search bar background image
  • Loading branch information
srahim committed Oct 8, 2013
2 parents a456eef + 46e4918 commit fd835dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 0 additions & 5 deletions iphone/Classes/TiUILabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,6 @@ -(void) updateBackgroundImageFrameWithPadding
[self backgroundImageLayer].frame = backgroundFrame;
}

-(void)setBackgroundImage_:(id)url
{
[super setBackgroundImage_:url];
}

-(void)setBackgroundPaddingLeft_:(id)left
{
padding.origin.x = [TiUtils floatValue:left];
Expand Down
13 changes: 5 additions & 8 deletions iphone/Classes/TiUISearchBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#import "TiUtils.h"
#import "TiUISearchBarProxy.h"
#import "TiUISearchBar.h"
#import "ImageLoader.h"

@implementation TiUISearchBar

Expand Down Expand Up @@ -143,15 +144,11 @@ -(void)setBarColor_:(id)value
}
}

-(CALayer *)backgroundImageLayer
-(void)setBackgroundImage_:(id)arg
{
if(backgroundLayer==nil)
{
backgroundLayer = [[CALayer alloc] init];
[backgroundLayer setFrame:[self bounds]];
[[[self searchBar] layer] insertSublayer:backgroundLayer atIndex:1];
}
return backgroundLayer;
UIImage *image = [self loadImage:arg];
[[self searchBar] setBackgroundImage:image];
self.backgroundImage = arg;
}

#pragma mark Delegate
Expand Down

0 comments on commit fd835dd

Please sign in to comment.