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
14 changes: 14 additions & 0 deletions DetailViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// DetailViewController.h
// iTunesSearch
//
// Created by Fernando Lucheti on 13/03/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface DetailViewController : UIViewController
@property (weak, nonatomic) IBOutlet UILabel *nome;

@end
37 changes: 37 additions & 0 deletions DetailViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// DetailViewController.m
// iTunesSearch
//
// Created by Fernando Lucheti on 13/03/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import "DetailViewController.h"

@interface DetailViewController ()

@end

@implementation DetailViewController

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

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

/*
#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
33 changes: 33 additions & 0 deletions DetailViewController.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14C109" 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="DetailViewController">
<connections>
<outlet property="nome" destination="1Ih-93-V3P" id="32X-qO-fbs"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Ih-93-V3P" userLabel="nome">
<rect key="frame" x="8" y="110" width="181" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="1Ih-93-V3P" firstAttribute="top" relation="greaterThanOrEqual" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="110" id="21L-ZA-nxV"/>
<constraint firstItem="1Ih-93-V3P" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="8" id="spo-et-Iic"/>
</constraints>
<point key="canvasLocation" x="317" y="623"/>
</view>
</objects>
</document>
35 changes: 35 additions & 0 deletions iTunesSearch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
objects = {

/* Begin PBXBuildFile section */
8B2B1B461AB3245F00342729 /* Musica.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2B1B451AB3245F00342729 /* Musica.m */; };
8B2B1B491AB3247500342729 /* Podcast.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2B1B481AB3247500342729 /* Podcast.m */; };
8B2B1B4C1AB3249E00342729 /* eBook.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2B1B4B1AB3249E00342729 /* eBook.m */; };
8B2B1B501AB3343200342729 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2B1B4E1AB3343200342729 /* DetailViewController.m */; };
8B2B1B511AB3343200342729 /* DetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8B2B1B4F1AB3343200342729 /* DetailViewController.xib */; };
8B77253B1AB1AE0E002702E6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8B77253A1AB1AE0E002702E6 /* Localizable.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 */; };
Expand All @@ -30,6 +36,16 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
8B2B1B441AB3245F00342729 /* Musica.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Musica.h; path = Entidades/Musica.h; sourceTree = "<group>"; };
8B2B1B451AB3245F00342729 /* Musica.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Musica.m; path = Entidades/Musica.m; sourceTree = "<group>"; };
8B2B1B471AB3247500342729 /* Podcast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Podcast.h; sourceTree = "<group>"; };
8B2B1B481AB3247500342729 /* Podcast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Podcast.m; sourceTree = "<group>"; };
8B2B1B4A1AB3249E00342729 /* eBook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eBook.h; sourceTree = "<group>"; };
8B2B1B4B1AB3249E00342729 /* eBook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = eBook.m; sourceTree = "<group>"; };
8B2B1B4D1AB3343200342729 /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; };
8B2B1B4E1AB3343200342729 /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
8B2B1B4F1AB3343200342729 /* DetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DetailViewController.xib; sourceTree = "<group>"; };
8B77253A1AB1AE0E002702E6 /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; };
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 = "<group>"; };
92C21CB51AAE757A0052ABE6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -72,6 +88,9 @@
92C21CA71AAE757A0052ABE6 = {
isa = PBXGroup;
children = (
8B2B1B4D1AB3343200342729 /* DetailViewController.h */,
8B2B1B4E1AB3343200342729 /* DetailViewController.m */,
8B2B1B4F1AB3343200342729 /* DetailViewController.xib */,
92C21CB21AAE757A0052ABE6 /* iTunesSearch */,
92C21CCC1AAE757A0052ABE6 /* iTunesSearchTests */,
92C21CB11AAE757A0052ABE6 /* Products */,
Expand Down Expand Up @@ -110,6 +129,7 @@
children = (
92C21CB41AAE757A0052ABE6 /* Info.plist */,
92C21CB51AAE757A0052ABE6 /* main.m */,
8B77253A1AB1AE0E002702E6 /* Localizable.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -146,6 +166,12 @@
children = (
92C21CE61AAE858E0052ABE6 /* Filme.h */,
92C21CE71AAE858E0052ABE6 /* Filme.m */,
8B2B1B441AB3245F00342729 /* Musica.h */,
8B2B1B451AB3245F00342729 /* Musica.m */,
8B2B1B471AB3247500342729 /* Podcast.h */,
8B2B1B481AB3247500342729 /* Podcast.m */,
8B2B1B4A1AB3249E00342729 /* eBook.h */,
8B2B1B4B1AB3249E00342729 /* eBook.m */,
);
name = Entidades;
sourceTree = "<group>";
Expand Down Expand Up @@ -231,6 +257,8 @@
buildActionMask = 2147483647;
files = (
92C21CC11AAE757A0052ABE6 /* Images.xcassets in Resources */,
8B77253B1AB1AE0E002702E6 /* Localizable.strings in Resources */,
8B2B1B511AB3343200342729 /* DetailViewController.xib in Resources */,
92C21CE21AAE76930052ABE6 /* TableViewCell.xib in Resources */,
92C21CDD1AAE75DC0052ABE6 /* TableView.xib in Resources */,
);
Expand All @@ -252,8 +280,12 @@
files = (
92C21CBC1AAE757A0052ABE6 /* TableViewController.m in Sources */,
92C21CDB1AAE75B30052ABE6 /* iTunesManager.m in Sources */,
8B2B1B491AB3247500342729 /* Podcast.m in Sources */,
92C21CB91AAE757A0052ABE6 /* AppDelegate.m in Sources */,
92C21CE81AAE858E0052ABE6 /* Filme.m in Sources */,
8B2B1B501AB3343200342729 /* DetailViewController.m in Sources */,
8B2B1B4C1AB3249E00342729 /* eBook.m in Sources */,
8B2B1B461AB3245F00342729 /* Musica.m in Sources */,
92C21CE11AAE76930052ABE6 /* TableViewCell.m in Sources */,
92C21CB61AAE757A0052ABE6 /* main.m in Sources */,
);
Expand Down Expand Up @@ -361,9 +393,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = iTunesSearch/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
Expand All @@ -372,6 +406,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = iTunesSearch/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
4 changes: 3 additions & 1 deletion iTunesSearch/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
#warning Adicionado codigo para iniciar com a interface do TableView
// TableViewController *tvc = [[TableViewController alloc] initWithNibName:@"TableView" bundle:nil];
TableViewController *tvc = [[TableViewController alloc] init];
[self.window setRootViewController:tvc];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:tvc];
[self.window setRootViewController:navController];

[self.window makeKeyAndVisible];
return YES;
}
Expand Down
7 changes: 4 additions & 3 deletions iTunesSearch/Entidades/Filme.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

#import <Foundation/Foundation.h>


@interface Filme : NSObject

@property (nonatomic, strong) NSString *nome;
@property (nonatomic, strong) NSString *trackId;
@property (nonatomic, strong) NSString *artista;
@property (nonatomic, strong) NSString *duracao;
@property (nonatomic, strong) NSString *descricao;
@property (nonatomic, strong) NSString *genero;
@property (nonatomic, strong) NSString *pais;
@property (nonatomic, strong) NSString *tipo;


@end
20 changes: 20 additions & 0 deletions iTunesSearch/Entidades/Musica.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Musica.h
// iTunesSearch
//
// Created by Fernando Lucheti on 13/03/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface Musica : NSObject

@property (nonatomic, strong) NSString *nome;
@property (nonatomic, strong) NSString *artista;
@property (nonatomic, strong) NSString *genero;
@property (nonatomic, strong) NSString *tipo;


@end
15 changes: 15 additions & 0 deletions iTunesSearch/Entidades/Musica.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Musica.m
// iTunesSearch
//
// Created by Fernando Lucheti on 13/03/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Musica.h"


@implementation Musica

@end
9 changes: 9 additions & 0 deletions iTunesSearch/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
Localizable.strings
iTunesSearch

Created by Fernando Lucheti on 12/03/15.
Copyright (c) 2015 joaquim. All rights reserved.
*/
"Não foi possível fazer a busca. ERRO: %@" = "Sorry, it was not possible to search. ERROR: %@";
"Busca" = "Busca";
22 changes: 22 additions & 0 deletions iTunesSearch/Podcast.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Podcast.h
// iTunesSearch
//
// Created by Fernando Lucheti on 13/03/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface Podcast : NSObject

@property (nonatomic, strong) NSString *nome;
@property (nonatomic, strong) NSString *tipo;

@property (nonatomic, strong) NSString *autor;
@property (nonatomic, strong) NSString *urlImagem;
@property (nonatomic, strong) NSString *descricao;


@end
13 changes: 13 additions & 0 deletions iTunesSearch/Podcast.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Podcast.m
// iTunesSearch
//
// Created by Fernando Lucheti on 13/03/15.
// Copyright (c) 2015 joaquim. All rights reserved.
//

#import "Podcast.h"

@implementation Podcast

@end
13 changes: 11 additions & 2 deletions iTunesSearch/TableView.xib
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14D72i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14C109" 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="searchbar" destination="CL9-eJ-OSp" id="K2u-e4-ohT"/>
<outlet property="tableview" destination="z24-IP-C1d" id="fiF-7d-ri3"/>
<outlet property="view" destination="z24-IP-C1d" id="NXu-VO-9o4"/>
<outlet property="view" destination="z24-IP-C1d" id="Vs5-IF-Kko"/>
</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"/>
<searchBar key="tableHeaderView" contentMode="redraw" text="" id="CL9-eJ-OSp">
<rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="-1" id="1ql-Ru-uB6"/>
</connections>
</searchBar>
<connections>
<outlet property="dataSource" destination="-1" id="grn-Rq-4Ux"/>
<outlet property="delegate" destination="-1" id="M2x-yu-OMO"/>
Expand Down
1 change: 1 addition & 0 deletions iTunesSearch/TableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

@property (weak, nonatomic) IBOutlet UILabel *nome;
@property (weak, nonatomic) IBOutlet UILabel *tipo;
@property (weak, nonatomic) IBOutlet UILabel *tipoFilme;


@end
11 changes: 9 additions & 2 deletions iTunesSearch/TableViewCell.xib
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14D72i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
Expand All @@ -20,6 +20,12 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Tipo" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AYo-KU-vp5">
<rect key="frame" x="150" y="34" width="284" height="21"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="12"/>
<color key="textColor" red="0.89928382640000004" green="0.12798005339999999" blue="0.001599563868" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Tipo da Mídia" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Z5-yj-wnl">
<rect key="frame" x="8" y="34" width="284" height="21"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="12"/>
Expand All @@ -38,7 +44,8 @@
</tableViewCellContentView>
<connections>
<outlet property="nome" destination="UIA-JU-luV" id="ubX-WX-gam"/>
<outlet property="tipo" destination="6Z5-yj-wnl" id="vYj-HE-tLd"/>
<outlet property="tipo" destination="6Z5-yj-wnl" id="pMz-l2-k2n"/>
<outlet property="tipoFilme" destination="AYo-KU-vp5" id="T6m-FW-nyD"/>
</connections>
<point key="canvasLocation" x="577" y="80.5"/>
</tableViewCell>
Expand Down
2 changes: 1 addition & 1 deletion iTunesSearch/TableViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@


@property (strong, nonatomic) IBOutlet UITableView *tableview;

@property (strong, nonatomic) IBOutlet UISearchBar *searchbar;
@end

Loading