Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
LocalizableString.strings
iTunesSearch

Created by Fernando on 3/10/15.
Copyright (c) 2015 joaquim. All rights reserved.
*/

"feature-movie"="movie";
"song"="song";
10 changes: 10 additions & 0 deletions fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
LocalizableString.strings
iTunesSearch

Created by Fernando on 3/10/15.
Copyright (c) 2015 joaquim. All rights reserved.
*/

"feature-movie"="Le Mouvê";
"song"="La Musiquê";
68 changes: 64 additions & 4 deletions iTunesSearch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@
92C21CC11AAE757A0052ABE6 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 92C21CC01AAE757A0052ABE6 /* Images.xcassets */; };
92C21CD01AAE757A0052ABE6 /* iTunesSearchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CCF1AAE757A0052ABE6 /* iTunesSearchTests.m */; };
92C21CDB1AAE75B30052ABE6 /* iTunesManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 92C21CDA1AAE75B30052ABE6 /* iTunesManager.m */; };
92C21CDD1AAE75DC0052ABE6 /* TableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 92C21CDC1AAE75DC0052ABE6 /* TableView.xib */; };
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 */; };
D427D3491AB24030009954B9 /* Desc.m in Sources */ = {isa = PBXBuildFile; fileRef = D427D3471AB24030009954B9 /* Desc.m */; };
D427D34A1AB24030009954B9 /* Desc.xib in Resources */ = {isa = PBXBuildFile; fileRef = D427D3481AB24030009954B9 /* Desc.xib */; };
D45A99D91AAF85980020E5C2 /* TableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D45A99DB1AAF85980020E5C2 /* TableView.xib */; };
D45A99E01AAF89A80020E5C2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D45A99E21AAF89A80020E5C2 /* Localizable.strings */; };
D45A99E71AB0C43D0020E5C2 /* Music.m in Sources */ = {isa = PBXBuildFile; fileRef = D45A99E61AB0C43D0020E5C2 /* Music.m */; };
D45A99EA1AB0C4B90020E5C2 /* Podcasts.m in Sources */ = {isa = PBXBuildFile; fileRef = D45A99E91AB0C4B90020E5C2 /* Podcasts.m */; };
D45E621A1AB38A45001859F0 /* Mae.m in Sources */ = {isa = PBXBuildFile; fileRef = D45E62191AB38A45001859F0 /* Mae.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -43,12 +49,26 @@
92C21CCF1AAE757A0052ABE6 /* iTunesSearchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iTunesSearchTests.m; sourceTree = "<group>"; };
92C21CD91AAE75B30052ABE6 /* iTunesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTunesManager.h; sourceTree = "<group>"; };
92C21CDA1AAE75B30052ABE6 /* iTunesManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iTunesManager.m; sourceTree = "<group>"; };
92C21CDC1AAE75DC0052ABE6 /* TableView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableView.xib; sourceTree = "<group>"; };
92C21CDE1AAE76930052ABE6 /* TableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableViewCell.h; sourceTree = "<group>"; };
92C21CDF1AAE76930052ABE6 /* TableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableViewCell.m; sourceTree = "<group>"; };
92C21CE01AAE76930052ABE6 /* TableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewCell.xib; sourceTree = "<group>"; };
92C21CE61AAE858E0052ABE6 /* Filme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Filme.h; path = Entidades/Filme.h; sourceTree = "<group>"; };
92C21CE71AAE858E0052ABE6 /* Filme.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Filme.m; path = Entidades/Filme.m; sourceTree = "<group>"; };
D427D3461AB24030009954B9 /* Desc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Desc.h; sourceTree = "<group>"; };
D427D3471AB24030009954B9 /* Desc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Desc.m; sourceTree = "<group>"; };
D427D3481AB24030009954B9 /* Desc.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Desc.xib; sourceTree = "<group>"; };
D45A99DA1AAF85980020E5C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/TableView.xib; sourceTree = "<group>"; };
D45A99DC1AAF85AD0020E5C2 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/TableView.strings; sourceTree = "<group>"; };
D45A99DD1AAF871C0020E5C2 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/TableView.strings; sourceTree = "<group>"; };
D45A99E11AAF89A80020E5C2 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = "<group>"; };
D45A99E31AAF89AB0020E5C2 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
D45A99E41AAF89AC0020E5C2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
D45A99E51AB0C43D0020E5C2 /* Music.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Music.h; path = Entidades/Music.h; sourceTree = "<group>"; };
D45A99E61AB0C43D0020E5C2 /* Music.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Music.m; path = Entidades/Music.m; sourceTree = "<group>"; };
D45A99E81AB0C4B90020E5C2 /* Podcasts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Podcasts.h; path = Entidades/Podcasts.h; sourceTree = "<group>"; };
D45A99E91AB0C4B90020E5C2 /* Podcasts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Podcasts.m; path = Entidades/Podcasts.m; sourceTree = "<group>"; };
D45E62181AB38A45001859F0 /* Mae.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mae.h; path = Entidades/Mae.h; sourceTree = "<group>"; };
D45E62191AB38A45001859F0 /* Mae.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Mae.m; path = Entidades/Mae.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -72,6 +92,7 @@
92C21CA71AAE757A0052ABE6 = {
isa = PBXGroup;
children = (
D45A99E21AAF89A80020E5C2 /* Localizable.strings */,
92C21CB21AAE757A0052ABE6 /* iTunesSearch */,
92C21CCC1AAE757A0052ABE6 /* iTunesSearchTests */,
92C21CB11AAE757A0052ABE6 /* Products */,
Expand All @@ -94,9 +115,12 @@
92C21CE91AAE859A0052ABE6 /* Entidades */,
92C21CB71AAE757A0052ABE6 /* AppDelegate.h */,
92C21CB81AAE757A0052ABE6 /* AppDelegate.m */,
D427D3461AB24030009954B9 /* Desc.h */,
D427D3471AB24030009954B9 /* Desc.m */,
D427D3481AB24030009954B9 /* Desc.xib */,
92C21CBA1AAE757A0052ABE6 /* TableViewController.h */,
92C21CBB1AAE757A0052ABE6 /* TableViewController.m */,
92C21CDC1AAE75DC0052ABE6 /* TableView.xib */,
D45A99DB1AAF85980020E5C2 /* TableView.xib */,
92C21CD91AAE75B30052ABE6 /* iTunesManager.h */,
92C21CDA1AAE75B30052ABE6 /* iTunesManager.m */,
92C21CC01AAE757A0052ABE6 /* Images.xcassets */,
Expand Down Expand Up @@ -146,6 +170,12 @@
children = (
92C21CE61AAE858E0052ABE6 /* Filme.h */,
92C21CE71AAE858E0052ABE6 /* Filme.m */,
D45A99E51AB0C43D0020E5C2 /* Music.h */,
D45A99E61AB0C43D0020E5C2 /* Music.m */,
D45A99E81AB0C4B90020E5C2 /* Podcasts.h */,
D45A99E91AB0C4B90020E5C2 /* Podcasts.m */,
D45E62181AB38A45001859F0 /* Mae.h */,
D45E62191AB38A45001859F0 /* Mae.m */,
);
name = Entidades;
sourceTree = "<group>";
Expand Down Expand Up @@ -213,6 +243,7 @@
knownRegions = (
en,
Base,
fr,
);
mainGroup = 92C21CA71AAE757A0052ABE6;
productRefGroup = 92C21CB11AAE757A0052ABE6 /* Products */;
Expand All @@ -231,8 +262,10 @@
buildActionMask = 2147483647;
files = (
92C21CC11AAE757A0052ABE6 /* Images.xcassets in Resources */,
D427D34A1AB24030009954B9 /* Desc.xib in Resources */,
92C21CE21AAE76930052ABE6 /* TableViewCell.xib in Resources */,
92C21CDD1AAE75DC0052ABE6 /* TableView.xib in Resources */,
D45A99E01AAF89A80020E5C2 /* Localizable.strings in Resources */,
D45A99D91AAF85980020E5C2 /* TableView.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -250,12 +283,16 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D45A99E71AB0C43D0020E5C2 /* Music.m in Sources */,
92C21CBC1AAE757A0052ABE6 /* TableViewController.m in Sources */,
92C21CDB1AAE75B30052ABE6 /* iTunesManager.m in Sources */,
92C21CB91AAE757A0052ABE6 /* AppDelegate.m in Sources */,
92C21CE81AAE858E0052ABE6 /* Filme.m in Sources */,
92C21CE11AAE76930052ABE6 /* TableViewCell.m in Sources */,
D45A99EA1AB0C4B90020E5C2 /* Podcasts.m in Sources */,
D427D3491AB24030009954B9 /* Desc.m in Sources */,
92C21CB61AAE757A0052ABE6 /* main.m in Sources */,
D45E621A1AB38A45001859F0 /* Mae.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -277,6 +314,29 @@
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
D45A99DB1AAF85980020E5C2 /* TableView.xib */ = {
isa = PBXVariantGroup;
children = (
D45A99DA1AAF85980020E5C2 /* Base */,
D45A99DC1AAF85AD0020E5C2 /* pt */,
D45A99DD1AAF871C0020E5C2 /* fr */,
);
name = TableView.xib;
sourceTree = "<group>";
};
D45A99E21AAF89A80020E5C2 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
D45A99E11AAF89A80020E5C2 /* pt */,
D45A99E31AAF89AB0020E5C2 /* fr */,
D45A99E41AAF89AC0020E5C2 /* en */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
92C21CD11AAE757A0052ABE6 /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down
2 changes: 1 addition & 1 deletion iTunesSearch/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property UINavigationController *navigation;

@end

16 changes: 14 additions & 2 deletions iTunesSearch/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#warning Classe importada para uso no metodo de inicilizacao da App
#import "TableViewController.h"
#import "Desc.h"

@interface AppDelegate ()

Expand All @@ -26,10 +27,21 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
self.window.backgroundColor = [UIColor whiteColor];

#warning Adicionado codigo para iniciar com a interface do TableView
// TableViewController *tvc = [[TableViewController alloc] initWithNibName:@"TableView" bundle:nil];
// TableViewController *tvc = [[TableViewController alloc] initWithNibName:@"TableView" bundle:nil];
TableViewController *tvc = [[TableViewController alloc] init];
[self.window setRootViewController:tvc];

UINavigationController *tableViewNavigation = [[UINavigationController alloc]initWithRootViewController:tvc];



[self.window setRootViewController:tableViewNavigation];
[self.window makeKeyAndVisible];
self.navigation = [[UINavigationController alloc] initWithRootViewController:[[Desc alloc] initWithNibName:@"Desc" bundle:nil]];

[self.window makeKeyAndVisible];

// self.window.rootViewController = self.navigation;

return YES;
}

Expand Down
58 changes: 58 additions & 0 deletions iTunesSearch/Base.lproj/TableView.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14C1510" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="TableViewController">
<connections>
<outlet property="search" destination="a3Y-l6-JRV" id="QcS-jH-wpR"/>
<outlet property="tableview" destination="z24-IP-C1d" id="fiF-7d-ri3"/>
<outlet property="view" destination="z24-IP-C1d" id="NXu-VO-9o4"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="z24-IP-C1d">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="0I6-2v-t4L">
<rect key="frame" x="0.0" y="0.0" width="600" height="58"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5WQ-PH-NlX">
<rect key="frame" x="472" y="12" width="90" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="Search">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="buscar:" destination="-1" eventType="touchUpInside" id="2Hb-cU-zt4"/>
</connections>
</button>
<searchBar contentMode="redraw" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="a3Y-l6-JRV">
<rect key="frame" x="8" y="5" width="438" height="44"/>
<textInputTraits key="textInputTraits"/>
</searchBar>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="5WQ-PH-NlX" firstAttribute="top" secondItem="0I6-2v-t4L" secondAttribute="top" constant="12" id="4dQ-hX-1R8"/>
<constraint firstAttribute="bottom" secondItem="a3Y-l6-JRV" secondAttribute="bottom" constant="9" id="7pv-rT-5LI"/>
<constraint firstItem="a3Y-l6-JRV" firstAttribute="top" secondItem="0I6-2v-t4L" secondAttribute="top" constant="5" id="U3M-lp-Pby">
<variation key="heightClass=regular-widthClass=compact" constant="15"/>
</constraint>
<constraint firstAttribute="bottom" secondItem="5WQ-PH-NlX" secondAttribute="bottom" constant="16" id="aWt-kN-9ao"/>
<constraint firstItem="a3Y-l6-JRV" firstAttribute="leading" secondItem="0I6-2v-t4L" secondAttribute="leading" constant="8" id="dxF-yD-PoG"/>
<constraint firstAttribute="trailing" secondItem="5WQ-PH-NlX" secondAttribute="trailing" constant="38" id="lSd-cm-Gq0"/>
<constraint firstItem="5WQ-PH-NlX" firstAttribute="leading" secondItem="a3Y-l6-JRV" secondAttribute="trailing" constant="26" id="pxj-Yd-m5L"/>
</constraints>
</view>
<connections>
<outlet property="dataSource" destination="-1" id="grn-Rq-4Ux"/>
<outlet property="delegate" destination="-1" id="M2x-yu-OMO"/>
</connections>
<point key="canvasLocation" x="-135" y="440"/>
</tableView>
</objects>
</document>
26 changes: 26 additions & 0 deletions iTunesSearch/Desc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// Desc.h
// iTunesSearch
//
// Created by Fernando on 3/12/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Filme.h"
#import "Music.h"
#import "Podcasts.h"

@interface Desc : UIViewController

@property (weak, nonatomic) IBOutlet UIImageView *imgDesc;
@property (weak, nonatomic) IBOutlet UILabel *nomeDesc;
@property (weak, nonatomic) IBOutlet UILabel *artistaDesc;

@property Mae *m;




-(void) carregaImagens:(NSString *)url;
@end
72 changes: 72 additions & 0 deletions iTunesSearch/Desc.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
//
// Desc.m
// iTunesSearch
//
// Created by Fernando on 3/12/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import "Desc.h"
#import "TableViewCell.h"

@interface Desc ()

@end

@implementation Desc
@synthesize imgDesc,nomeDesc,artistaDesc,m;

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.


}

-(void)viewWillAppear:(BOOL)animated{
artistaDesc.text = m.artista;
nomeDesc.text = m.nome;
[self carregaImagens:m.img];
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

-(void) carregaImagens:(NSString *)url
{
NSData * imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:url]];
UIImage *image = [[UIImage alloc] initWithData:imageData];
imgDesc.image = image;
}

//
//-(void) update1:(Filme *)objeto{
// [nomeDesc setText:objeto.nome];
// [artistaDesc setText:objeto.artista];
// [self carregaImagens:objeto.img];
//}
//
//-(void) update2:(Music *)objeto{
// [nomeDesc setText:objeto.nome];
// [artistaDesc setText:objeto.artista];
// [self carregaImagens:objeto.img];
//}
//
//-(void) update0:(Podcasts *)objeto{
// [nomeDesc setText:objeto.nome];
// [artistaDesc setText:objeto.artista];
// [self carregaImagens:objeto.img];
//}
/*
#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
Loading