From 5270c76908e1f199a2d2c16521bef8fd36063cac Mon Sep 17 00:00:00 2001 From: gsantunes Date: Tue, 10 Mar 2015 16:40:29 -0300 Subject: [PATCH 1/4] bronze1 --- iTunesSearch/TableView.xib | 2 +- iTunesSearch/TableViewCell.h | 3 ++ iTunesSearch/TableViewCell.xib | 46 +++++++++++++++++++----------- iTunesSearch/TableViewController.m | 3 ++ 4 files changed, 36 insertions(+), 18 deletions(-) diff --git a/iTunesSearch/TableView.xib b/iTunesSearch/TableView.xib index 55f128c..f4a02b9 100644 --- a/iTunesSearch/TableView.xib +++ b/iTunesSearch/TableView.xib @@ -1,5 +1,5 @@ - + diff --git a/iTunesSearch/TableViewCell.h b/iTunesSearch/TableViewCell.h index b630349..e54378b 100644 --- a/iTunesSearch/TableViewCell.h +++ b/iTunesSearch/TableViewCell.h @@ -12,6 +12,9 @@ @property (weak, nonatomic) IBOutlet UILabel *nome; @property (weak, nonatomic) IBOutlet UILabel *tipo; +@property (weak, nonatomic) IBOutlet UILabel *genero; +@property (weak, nonatomic) IBOutlet UILabel *pais; +@property (weak, nonatomic) IBOutlet UILabel *trackId; @end diff --git a/iTunesSearch/TableViewCell.xib b/iTunesSearch/TableViewCell.xib index bf8bd3f..e3711a2 100644 --- a/iTunesSearch/TableViewCell.xib +++ b/iTunesSearch/TableViewCell.xib @@ -1,46 +1,58 @@ - + - - - + + - - - - - - - - - + + + - + diff --git a/iTunesSearch/TableViewController.m b/iTunesSearch/TableViewController.m index f689980..3576358 100644 --- a/iTunesSearch/TableViewController.m +++ b/iTunesSearch/TableViewController.m @@ -56,6 +56,9 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS [celula.nome setText:filme.nome]; [celula.tipo setText:@"Filme"]; + [celula.genero setText:filme.genero]; + [celula.pais setText:filme.pais]; + [celula.trackId setText:[NSString stringWithFormat:@"ID:%@", filme.trackId]]; return celula; } From 5bb376b815bd3a500d59985089a64e0d95dff6b8 Mon Sep 17 00:00:00 2001 From: gsantunes Date: Tue, 10 Mar 2015 17:28:17 -0300 Subject: [PATCH 2/4] bronze2 --- iTunesSearch/TableView.xib | 99 +++++++++++++++++++++++++++--- iTunesSearch/TableViewCell.h | 1 - iTunesSearch/TableViewController.h | 4 ++ iTunesSearch/TableViewController.m | 9 +++ 4 files changed, 103 insertions(+), 10 deletions(-) diff --git a/iTunesSearch/TableView.xib b/iTunesSearch/TableView.xib index f4a02b9..ef66323 100644 --- a/iTunesSearch/TableView.xib +++ b/iTunesSearch/TableView.xib @@ -2,24 +2,105 @@ + - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iTunesSearch/TableViewCell.h b/iTunesSearch/TableViewCell.h index e54378b..2c1d57a 100644 --- a/iTunesSearch/TableViewCell.h +++ b/iTunesSearch/TableViewCell.h @@ -14,7 +14,6 @@ @property (weak, nonatomic) IBOutlet UILabel *tipo; @property (weak, nonatomic) IBOutlet UILabel *genero; @property (weak, nonatomic) IBOutlet UILabel *pais; - @property (weak, nonatomic) IBOutlet UILabel *trackId; @end diff --git a/iTunesSearch/TableViewController.h b/iTunesSearch/TableViewController.h index 0cbb5c4..91d9e40 100644 --- a/iTunesSearch/TableViewController.h +++ b/iTunesSearch/TableViewController.h @@ -13,5 +13,9 @@ @property (strong, nonatomic) IBOutlet UITableView *tableview; +@property (weak, nonatomic) IBOutlet UITextField *texto; + +- (IBAction)go:(id)sender; + @end diff --git a/iTunesSearch/TableViewController.m b/iTunesSearch/TableViewController.m index 3576358..11fd88c 100644 --- a/iTunesSearch/TableViewController.m +++ b/iTunesSearch/TableViewController.m @@ -13,6 +13,7 @@ @interface TableViewController () { NSArray *midias; + NSString *busca; } @end @@ -68,4 +69,12 @@ -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPat } +- (IBAction)go:(id)sender { + + iTunesManager *itunes = [iTunesManager sharedInstance]; + busca = _texto.text; + midias = [itunes buscarMidias:busca]; + [self.tableview reloadData]; + +} @end From aff3d4b00d66fd512c6f717da2a8d19094dd59a8 Mon Sep 17 00:00:00 2001 From: gsantunes Date: Wed, 11 Mar 2015 16:07:02 -0300 Subject: [PATCH 3/4] =?UTF-8?q?mudan=C3=A7a=20de=20idioma=20-=20bronze=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iTunesSearch.xcodeproj/project.pbxproj | 45 ++++++++++++++++++++ iTunesSearch/TableView.xib | 43 ++++++++++--------- iTunesSearch/TableViewController.h | 1 + iTunesSearch/TableViewController.m | 3 +- iTunesSearch/fr.lproj/InfoPlist.strings | 1 + iTunesSearch/fr.lproj/Localizable.strings | 3 ++ iTunesSearch/iTunesManager.m | 2 +- iTunesSearch/pt.lproj/InfoPlist.strings | 1 + iTunesSearch/pt.lproj/Localizable.strings | 3 ++ iTunesSearchTests/fr.lproj/InfoPlist.strings | 1 + iTunesSearchTests/pt.lproj/InfoPlist.strings | 1 + 11 files changed, 80 insertions(+), 24 deletions(-) create mode 100644 iTunesSearch/fr.lproj/InfoPlist.strings create mode 100644 iTunesSearch/fr.lproj/Localizable.strings create mode 100644 iTunesSearch/pt.lproj/InfoPlist.strings create mode 100644 iTunesSearch/pt.lproj/Localizable.strings create mode 100644 iTunesSearchTests/fr.lproj/InfoPlist.strings create mode 100644 iTunesSearchTests/pt.lproj/InfoPlist.strings diff --git a/iTunesSearch.xcodeproj/project.pbxproj b/iTunesSearch.xcodeproj/project.pbxproj index 79e06d7..fa036ef 100644 --- a/iTunesSearch.xcodeproj/project.pbxproj +++ b/iTunesSearch.xcodeproj/project.pbxproj @@ -7,6 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 21B2D24D1AB0C6ED00D9709D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 21B2D24F1AB0C6ED00D9709D /* Localizable.strings */; }; + 21B2D2521AB0C6EE00D9709D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 21B2D2541AB0C6EE00D9709D /* InfoPlist.strings */; }; + 21B2D2571AB0C6EE00D9709D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 21B2D2591AB0C6EE00D9709D /* InfoPlist.strings */; }; 92C21CB61AAE757A0052ABE6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CB51AAE757A0052ABE6 /* main.m */; }; 92C21CB91AAE757A0052ABE6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CB81AAE757A0052ABE6 /* AppDelegate.m */; }; 92C21CBC1AAE757A0052ABE6 /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CBB1AAE757A0052ABE6 /* TableViewController.m */; }; @@ -30,6 +33,12 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 21B2D24E1AB0C6ED00D9709D /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = ""; }; + 21B2D2531AB0C6EE00D9709D /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 21B2D2581AB0C6EE00D9709D /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 21B2D25A1AB0C72F00D9709D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 21B2D25B1AB0C72F00D9709D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; + 21B2D25C1AB0C72F00D9709D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; 92C21CB01AAE757A0052ABE6 /* iTunesSearch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iTunesSearch.app; sourceTree = BUILT_PRODUCTS_DIR; }; 92C21CB41AAE757A0052ABE6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 92C21CB51AAE757A0052ABE6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -108,6 +117,8 @@ 92C21CB31AAE757A0052ABE6 /* Supporting Files */ = { isa = PBXGroup; children = ( + 21B2D2541AB0C6EE00D9709D /* InfoPlist.strings */, + 21B2D24F1AB0C6ED00D9709D /* Localizable.strings */, 92C21CB41AAE757A0052ABE6 /* Info.plist */, 92C21CB51AAE757A0052ABE6 /* main.m */, ); @@ -126,6 +137,7 @@ 92C21CCD1AAE757A0052ABE6 /* Supporting Files */ = { isa = PBXGroup; children = ( + 21B2D2591AB0C6EE00D9709D /* InfoPlist.strings */, 92C21CCE1AAE757A0052ABE6 /* Info.plist */, ); name = "Supporting Files"; @@ -231,8 +243,10 @@ buildActionMask = 2147483647; files = ( 92C21CC11AAE757A0052ABE6 /* Images.xcassets in Resources */, + 21B2D24D1AB0C6ED00D9709D /* Localizable.strings in Resources */, 92C21CE21AAE76930052ABE6 /* TableViewCell.xib in Resources */, 92C21CDD1AAE75DC0052ABE6 /* TableView.xib in Resources */, + 21B2D2521AB0C6EE00D9709D /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -240,6 +254,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 21B2D2571AB0C6EE00D9709D /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -277,6 +292,36 @@ }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 21B2D24F1AB0C6ED00D9709D /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 21B2D24E1AB0C6ED00D9709D /* pt */, + 21B2D25A1AB0C72F00D9709D /* fr */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 21B2D2541AB0C6EE00D9709D /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 21B2D2531AB0C6EE00D9709D /* pt */, + 21B2D25B1AB0C72F00D9709D /* fr */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 21B2D2591AB0C6EE00D9709D /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 21B2D2581AB0C6EE00D9709D /* pt */, + 21B2D25C1AB0C72F00D9709D /* fr */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 92C21CD11AAE757A0052ABE6 /* Debug */ = { isa = XCBuildConfiguration; diff --git a/iTunesSearch/TableView.xib b/iTunesSearch/TableView.xib index ef66323..17188a4 100644 --- a/iTunesSearch/TableView.xib +++ b/iTunesSearch/TableView.xib @@ -7,6 +7,7 @@ + @@ -48,19 +49,19 @@