From c9c7afdbfc1e915f988578e42fd46a224d1ef1e8 Mon Sep 17 00:00:00 2001 From: rafaelferoli Date: Tue, 10 Mar 2015 17:21:43 -0300 Subject: [PATCH 1/2] bronze 1 e bronze 2 prontos --- iTunesSearch.xcodeproj/project.pbxproj | 10 ++++++++ iTunesSearch/HeaderTableViewCell.h | 14 +++++++++++ iTunesSearch/HeaderTableViewCell.m | 33 ++++++++++++++++++++++++++ iTunesSearch/ReaderTableView.xib | 31 ++++++++++++++++++++++++ iTunesSearch/TableViewCell.h | 2 ++ iTunesSearch/TableViewCell.xib | 28 ++++++++++++++++++++-- iTunesSearch/TableViewController.h | 3 +++ iTunesSearch/TableViewController.m | 24 +++++++++++++++---- 8 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 iTunesSearch/HeaderTableViewCell.h create mode 100644 iTunesSearch/HeaderTableViewCell.m create mode 100644 iTunesSearch/ReaderTableView.xib diff --git a/iTunesSearch.xcodeproj/project.pbxproj b/iTunesSearch.xcodeproj/project.pbxproj index 79e06d7..a8ce81e 100644 --- a/iTunesSearch.xcodeproj/project.pbxproj +++ b/iTunesSearch.xcodeproj/project.pbxproj @@ -17,6 +17,8 @@ 92C21CE11AAE76930052ABE6 /* TableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CDF1AAE76930052ABE6 /* TableViewCell.m */; }; 92C21CE21AAE76930052ABE6 /* TableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 92C21CE01AAE76930052ABE6 /* TableViewCell.xib */; }; 92C21CE81AAE858E0052ABE6 /* Filme.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CE71AAE858E0052ABE6 /* Filme.m */; }; + CA4EE5701AAF820C001E427A /* ReaderTableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = CA4EE56F1AAF820C001E427A /* ReaderTableView.xib */; }; + CA4EE5731AAF8267001E427A /* HeaderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4EE5721AAF8267001E427A /* HeaderTableViewCell.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -49,6 +51,9 @@ 92C21CE01AAE76930052ABE6 /* TableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewCell.xib; sourceTree = ""; }; 92C21CE61AAE858E0052ABE6 /* Filme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Filme.h; path = Entidades/Filme.h; sourceTree = ""; }; 92C21CE71AAE858E0052ABE6 /* Filme.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Filme.m; path = Entidades/Filme.m; sourceTree = ""; }; + CA4EE56F1AAF820C001E427A /* ReaderTableView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ReaderTableView.xib; sourceTree = ""; }; + CA4EE5711AAF8267001E427A /* HeaderTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeaderTableViewCell.h; sourceTree = ""; }; + CA4EE5721AAF8267001E427A /* HeaderTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeaderTableViewCell.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -136,6 +141,9 @@ children = ( 92C21CDE1AAE76930052ABE6 /* TableViewCell.h */, 92C21CDF1AAE76930052ABE6 /* TableViewCell.m */, + CA4EE56F1AAF820C001E427A /* ReaderTableView.xib */, + CA4EE5711AAF8267001E427A /* HeaderTableViewCell.h */, + CA4EE5721AAF8267001E427A /* HeaderTableViewCell.m */, 92C21CE01AAE76930052ABE6 /* TableViewCell.xib */, ); name = Celulas; @@ -232,6 +240,7 @@ files = ( 92C21CC11AAE757A0052ABE6 /* Images.xcassets in Resources */, 92C21CE21AAE76930052ABE6 /* TableViewCell.xib in Resources */, + CA4EE5701AAF820C001E427A /* ReaderTableView.xib in Resources */, 92C21CDD1AAE75DC0052ABE6 /* TableView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -251,6 +260,7 @@ buildActionMask = 2147483647; files = ( 92C21CBC1AAE757A0052ABE6 /* TableViewController.m in Sources */, + CA4EE5731AAF8267001E427A /* HeaderTableViewCell.m in Sources */, 92C21CDB1AAE75B30052ABE6 /* iTunesManager.m in Sources */, 92C21CB91AAE757A0052ABE6 /* AppDelegate.m in Sources */, 92C21CE81AAE858E0052ABE6 /* Filme.m in Sources */, diff --git a/iTunesSearch/HeaderTableViewCell.h b/iTunesSearch/HeaderTableViewCell.h new file mode 100644 index 0000000..a7d4f96 --- /dev/null +++ b/iTunesSearch/HeaderTableViewCell.h @@ -0,0 +1,14 @@ +// +// HeaderTableViewCell.h +// iTunesSearch +// +// Created by Rafael Fernandes de Oliveira Carvalho on 3/10/15. +// Copyright (c) 2015 joaquim. All rights reserved. +// + +#import + +@interface HeaderTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UISearchBar *searchBar; + +@end diff --git a/iTunesSearch/HeaderTableViewCell.m b/iTunesSearch/HeaderTableViewCell.m new file mode 100644 index 0000000..58de309 --- /dev/null +++ b/iTunesSearch/HeaderTableViewCell.m @@ -0,0 +1,33 @@ +// +// HeaderTableViewCell.m +// iTunesSearch +// +// Created by Rafael Fernandes de Oliveira Carvalho on 3/10/15. +// Copyright (c) 2015 joaquim. All rights reserved. +// + +#import "HeaderTableViewCell.h" +#import "TableViewController.h" +#import "iTunesManager.h" + +@implementation HeaderTableViewCell + +- (void)awakeFromNib { + [_searchBar setDelegate:self]; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + + +- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { + iTunesManager *itunes = [iTunesManager sharedInstance]; + TableViewController *tableView = (TableViewController *)[UIApplication sharedApplication].keyWindow.rootViewController; + tableView.midias = [itunes buscarMidias:[_searchBar.text stringByReplacingOccurrencesOfString:@" " withString:@"-"]]; + [tableView.tableview reloadData]; +} + +@end diff --git a/iTunesSearch/ReaderTableView.xib b/iTunesSearch/ReaderTableView.xib new file mode 100644 index 0000000..366e1f2 --- /dev/null +++ b/iTunesSearch/ReaderTableView.xib @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iTunesSearch/TableViewCell.h b/iTunesSearch/TableViewCell.h index b630349..1e156a7 100644 --- a/iTunesSearch/TableViewCell.h +++ b/iTunesSearch/TableViewCell.h @@ -12,6 +12,8 @@ @property (weak, nonatomic) IBOutlet UILabel *nome; @property (weak, nonatomic) IBOutlet UILabel *tipo; +@property (weak, nonatomic) IBOutlet UILabel *genero; +@property (weak, nonatomic) IBOutlet UILabel *artista; @end diff --git a/iTunesSearch/TableViewCell.xib b/iTunesSearch/TableViewCell.xib index bf8bd3f..7e07f3c 100644 --- a/iTunesSearch/TableViewCell.xib +++ b/iTunesSearch/TableViewCell.xib @@ -1,5 +1,5 @@ - + @@ -17,7 +17,7 @@ + + + + + + + + + + + + + + diff --git a/iTunesSearch/TableViewController.h b/iTunesSearch/TableViewController.h index 0cbb5c4..d1e339a 100644 --- a/iTunesSearch/TableViewController.h +++ b/iTunesSearch/TableViewController.h @@ -7,11 +7,14 @@ // #import +#import "HeaderTableViewCell.h" @interface TableViewController : UIViewController @property (strong, nonatomic) IBOutlet UITableView *tableview; +@property NSArray *midias; +@property HeaderTableViewCell *headerView; @end diff --git a/iTunesSearch/TableViewController.m b/iTunesSearch/TableViewController.m index f689980..4b0957e 100644 --- a/iTunesSearch/TableViewController.m +++ b/iTunesSearch/TableViewController.m @@ -12,7 +12,7 @@ #import "Entidades/Filme.h" @interface TableViewController () { - NSArray *midias; + } @end @@ -26,9 +26,9 @@ - (void)viewDidLoad { UINib *nib = [UINib nibWithNibName:@"TableViewCell" bundle:nil]; [self.tableview registerNib:nib forCellReuseIdentifier:@"celulaPadrao"]; - iTunesManager *itunes = [iTunesManager sharedInstance]; - midias = [itunes buscarMidias:@"Apple"]; + + #warning Necessario para que a table view tenha um espaco em relacao ao topo, pois caso contrario o texto ficara atras da barra superior self.tableview.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableview.bounds.size.width, 15.f)]; @@ -46,16 +46,18 @@ -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [midias count]; + return [_midias count]; } -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { TableViewCell *celula = [self.tableview dequeueReusableCellWithIdentifier:@"celulaPadrao"]; - Filme *filme = [midias objectAtIndex:indexPath.row]; + Filme *filme = [_midias objectAtIndex:indexPath.row]; [celula.nome setText:filme.nome]; [celula.tipo setText:@"Filme"]; + [celula.genero setText:filme.genero]; + [celula.artista setText:filme.artista]; return celula; } @@ -64,5 +66,17 @@ -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPat return 70; } +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + + _headerView = [[[NSBundle mainBundle]loadNibNamed:@"ReaderTableView" owner:self options:nil]firstObject]; + + return _headerView; + +} + +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 65; +} + @end From 647402970b77123d524c838fe510f5ba73cc7b57 Mon Sep 17 00:00:00 2001 From: rafaelferoli Date: Mon, 16 Mar 2015 13:21:24 -0300 Subject: [PATCH 2/2] Bronze Ok --- iTunesSearch.xcodeproj/project.pbxproj | 33 ++++++++++ iTunesSearch/Base.lproj/Localizable.strings | 9 +++ iTunesSearch/DetailViewController.h | 16 +++++ iTunesSearch/DetailViewController.m | 51 ++++++++++++++ iTunesSearch/DetailViewController.xib | 73 +++++++++++++++++++++ iTunesSearch/HeaderTableViewCell.m | 2 + iTunesSearch/TableViewCell.h | 1 + iTunesSearch/TableViewCell.xib | 47 +++++++++---- iTunesSearch/TableViewController.m | 9 +++ iTunesSearch/en.lproj/Localizable.strings | 10 +++ iTunesSearch/fr.lproj/Localizable.strings | 10 +++ iTunesSearch/iTunesManager.m | 2 +- iTunesSearch/pt.lproj/Localizable.strings | 9 +++ 13 files changed, 260 insertions(+), 12 deletions(-) create mode 100644 iTunesSearch/Base.lproj/Localizable.strings create mode 100644 iTunesSearch/DetailViewController.h create mode 100644 iTunesSearch/DetailViewController.m create mode 100644 iTunesSearch/DetailViewController.xib create mode 100644 iTunesSearch/en.lproj/Localizable.strings create mode 100644 iTunesSearch/fr.lproj/Localizable.strings create mode 100644 iTunesSearch/pt.lproj/Localizable.strings diff --git a/iTunesSearch.xcodeproj/project.pbxproj b/iTunesSearch.xcodeproj/project.pbxproj index a8ce81e..c062fec 100644 --- a/iTunesSearch.xcodeproj/project.pbxproj +++ b/iTunesSearch.xcodeproj/project.pbxproj @@ -17,6 +17,9 @@ 92C21CE11AAE76930052ABE6 /* TableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CDF1AAE76930052ABE6 /* TableViewCell.m */; }; 92C21CE21AAE76930052ABE6 /* TableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 92C21CE01AAE76930052ABE6 /* TableViewCell.xib */; }; 92C21CE81AAE858E0052ABE6 /* Filme.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CE71AAE858E0052ABE6 /* Filme.m */; }; + CA4E47051AB34FDF001F320E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = CA4E47071AB34FDF001F320E /* Localizable.strings */; }; + CA4E47401AB735EB001F320E /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4E473E1AB735EB001F320E /* DetailViewController.m */; }; + CA4E47411AB735EB001F320E /* DetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CA4E473F1AB735EB001F320E /* DetailViewController.xib */; }; CA4EE5701AAF820C001E427A /* ReaderTableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = CA4EE56F1AAF820C001E427A /* ReaderTableView.xib */; }; CA4EE5731AAF8267001E427A /* HeaderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA4EE5721AAF8267001E427A /* HeaderTableViewCell.m */; }; /* End PBXBuildFile section */ @@ -51,6 +54,13 @@ 92C21CE01AAE76930052ABE6 /* TableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewCell.xib; sourceTree = ""; }; 92C21CE61AAE858E0052ABE6 /* Filme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Filme.h; path = Entidades/Filme.h; sourceTree = ""; }; 92C21CE71AAE858E0052ABE6 /* Filme.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Filme.m; path = Entidades/Filme.m; sourceTree = ""; }; + CA4E47061AB34FDF001F320E /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + CA4E47081AB34FE2001F320E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + CA4E47091AB35076001F320E /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + CA4E470A1AB35174001F320E /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = ""; }; + CA4E473D1AB735EB001F320E /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; }; + CA4E473E1AB735EB001F320E /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; }; + CA4E473F1AB735EB001F320E /* DetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DetailViewController.xib; sourceTree = ""; }; CA4EE56F1AAF820C001E427A /* ReaderTableView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ReaderTableView.xib; sourceTree = ""; }; CA4EE5711AAF8267001E427A /* HeaderTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeaderTableViewCell.h; sourceTree = ""; }; CA4EE5721AAF8267001E427A /* HeaderTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeaderTableViewCell.m; sourceTree = ""; }; @@ -101,6 +111,9 @@ 92C21CB81AAE757A0052ABE6 /* AppDelegate.m */, 92C21CBA1AAE757A0052ABE6 /* TableViewController.h */, 92C21CBB1AAE757A0052ABE6 /* TableViewController.m */, + CA4E473D1AB735EB001F320E /* DetailViewController.h */, + CA4E473E1AB735EB001F320E /* DetailViewController.m */, + CA4E473F1AB735EB001F320E /* DetailViewController.xib */, 92C21CDC1AAE75DC0052ABE6 /* TableView.xib */, 92C21CD91AAE75B30052ABE6 /* iTunesManager.h */, 92C21CDA1AAE75B30052ABE6 /* iTunesManager.m */, @@ -144,6 +157,7 @@ CA4EE56F1AAF820C001E427A /* ReaderTableView.xib */, CA4EE5711AAF8267001E427A /* HeaderTableViewCell.h */, CA4EE5721AAF8267001E427A /* HeaderTableViewCell.m */, + CA4E47071AB34FDF001F320E /* Localizable.strings */, 92C21CE01AAE76930052ABE6 /* TableViewCell.xib */, ); name = Celulas; @@ -221,6 +235,8 @@ knownRegions = ( en, Base, + fr, + pt, ); mainGroup = 92C21CA71AAE757A0052ABE6; productRefGroup = 92C21CB11AAE757A0052ABE6 /* Products */; @@ -238,6 +254,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + CA4E47051AB34FDF001F320E /* Localizable.strings in Resources */, + CA4E47411AB735EB001F320E /* DetailViewController.xib in Resources */, 92C21CC11AAE757A0052ABE6 /* Images.xcassets in Resources */, 92C21CE21AAE76930052ABE6 /* TableViewCell.xib in Resources */, CA4EE5701AAF820C001E427A /* ReaderTableView.xib in Resources */, @@ -262,6 +280,7 @@ 92C21CBC1AAE757A0052ABE6 /* TableViewController.m in Sources */, CA4EE5731AAF8267001E427A /* HeaderTableViewCell.m in Sources */, 92C21CDB1AAE75B30052ABE6 /* iTunesManager.m in Sources */, + CA4E47401AB735EB001F320E /* DetailViewController.m in Sources */, 92C21CB91AAE757A0052ABE6 /* AppDelegate.m in Sources */, 92C21CE81AAE858E0052ABE6 /* Filme.m in Sources */, 92C21CE11AAE76930052ABE6 /* TableViewCell.m in Sources */, @@ -287,6 +306,20 @@ }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + CA4E47071AB34FDF001F320E /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + CA4E47061AB34FDF001F320E /* Base */, + CA4E47081AB34FE2001F320E /* en */, + CA4E47091AB35076001F320E /* fr */, + CA4E470A1AB35174001F320E /* pt */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 92C21CD11AAE757A0052ABE6 /* Debug */ = { isa = XCBuildConfiguration; diff --git a/iTunesSearch/Base.lproj/Localizable.strings b/iTunesSearch/Base.lproj/Localizable.strings new file mode 100644 index 0000000..d7136c1 --- /dev/null +++ b/iTunesSearch/Base.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + iTunesSearch + + Created by Rafael Fernandes de Oliveira Carvalho on 3/13/15. + Copyright (c) 2015 joaquim. All rights reserved. +*/ + +"Pesquisar"= "Pesquisar"; \ No newline at end of file diff --git a/iTunesSearch/DetailViewController.h b/iTunesSearch/DetailViewController.h new file mode 100644 index 0000000..2f4fc5a --- /dev/null +++ b/iTunesSearch/DetailViewController.h @@ -0,0 +1,16 @@ +// +// DetailViewController.h +// iTunesSearch +// +// Created by Rafael Fernandes de Oliveira Carvalho on 3/16/15. +// Copyright (c) 2015 joaquim. All rights reserved. +// + +#import +#import "Filme.h" + +@interface DetailViewController : UIViewController + +@property Filme *filme; + +@end diff --git a/iTunesSearch/DetailViewController.m b/iTunesSearch/DetailViewController.m new file mode 100644 index 0000000..245f379 --- /dev/null +++ b/iTunesSearch/DetailViewController.m @@ -0,0 +1,51 @@ +// +// DetailViewController.m +// iTunesSearch +// +// Created by Rafael Fernandes de Oliveira Carvalho on 3/16/15. +// Copyright (c) 2015 joaquim. All rights reserved. +// + +#import "DetailViewController.h" + +@interface DetailViewController () +@property (weak, nonatomic) IBOutlet UILabel *nameLabel; +@property (weak, nonatomic) IBOutlet UILabel *tipoLabel; +@property (weak, nonatomic) IBOutlet UILabel *localLabel; +@property (weak, nonatomic) IBOutlet UILabel *artistaLabel; +@property (weak, nonatomic) IBOutlet UILabel *midiaLabel; + +@end + +@implementation DetailViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + _nameLabel.text = _filme.nome; + _tipoLabel.text = _filme.genero; + _localLabel.text = _filme.pais; + _artistaLabel.text = _filme.artista; + _midiaLabel.text = @"Filme"; + + // Do any additional setup after loading the view from its nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} +- (IBAction)back:(id)sender { + [self dismissViewControllerAnimated:YES completion:nil]; +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/iTunesSearch/DetailViewController.xib b/iTunesSearch/DetailViewController.xib new file mode 100644 index 0000000..0eb83c8 --- /dev/null +++ b/iTunesSearch/DetailViewController.xib @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iTunesSearch/HeaderTableViewCell.m b/iTunesSearch/HeaderTableViewCell.m index 58de309..30de3cf 100644 --- a/iTunesSearch/HeaderTableViewCell.m +++ b/iTunesSearch/HeaderTableViewCell.m @@ -14,6 +14,8 @@ @implementation HeaderTableViewCell - (void)awakeFromNib { [_searchBar setDelegate:self]; + _searchBar.placeholder = NSLocalizedString(@"Pesquisar", @""); + } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { diff --git a/iTunesSearch/TableViewCell.h b/iTunesSearch/TableViewCell.h index 1e156a7..70f856f 100644 --- a/iTunesSearch/TableViewCell.h +++ b/iTunesSearch/TableViewCell.h @@ -14,6 +14,7 @@ @property (weak, nonatomic) IBOutlet UILabel *tipo; @property (weak, nonatomic) IBOutlet UILabel *genero; @property (weak, nonatomic) IBOutlet UILabel *artista; +@property (weak, nonatomic) IBOutlet UILabel *pais; @end diff --git a/iTunesSearch/TableViewCell.xib b/iTunesSearch/TableViewCell.xib index 7e07f3c..de5e1a3 100644 --- a/iTunesSearch/TableViewCell.xib +++ b/iTunesSearch/TableViewCell.xib @@ -20,36 +20,60 @@ -