for (UIView *view in self.navigationController.navigationBar.subviews) {
if([view isKindOfClass:[NSClassFromString(@"UINavigationItemView") class]]) {
for (UIView *view1 in view.subviews) {
NSLog(@"~~~~~~~~~~~~~~~~~~~~%@", view1);
UILabel *label1 = (UILabel *)view1;
UIImageView *img = [[UIImageView alloc] initWithFrame:label1.bounds];
img.center = label1.center;
img.image = [UIImage imageNamed:@"imagename.jpg"];
[label1 addSubview:img];
}
}
}