Permalink
Browse files

Integración cambio de logos y video funcionando

  • Loading branch information...
1 parent 37941bc commit 9107904def7027fdd09c55b25c1a3a71325397c3 @vidriloco vidriloco committed Dec 12, 2011
@@ -7,7 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
- 17FF58A4149581510056C21F /* VideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FF58A3149581510056C21F /* VideoViewController.m */; };
+ 17A854631495ABB300C0B901 /* TicagrelorMecanismodeAccion.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 17A854611495ABB300C0B901 /* TicagrelorMecanismodeAccion.mp4 */; };
+ 17A854641495ABB300C0B901 /* VideoCorazon.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 17A854621495ABB300C0B901 /* VideoCorazon.mp4 */; };
17FF58A6149583E20056C21F /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17FF58A5149583E20056C21F /* MediaPlayer.framework */; };
17FF58AD149588DC0056C21F /* ResourceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FF58AC149588DC0056C21F /* ResourceView.m */; };
AA038D22149495CC00667A09 /* ListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AA038D20149495CC00667A09 /* ListViewController.m */; };
@@ -74,8 +75,8 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
- 17FF58A2149581510056C21F /* VideoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoViewController.h; sourceTree = "<group>"; };
- 17FF58A3149581510056C21F /* VideoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoViewController.m; sourceTree = "<group>"; };
+ 17A854611495ABB300C0B901 /* TicagrelorMecanismodeAccion.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = TicagrelorMecanismodeAccion.mp4; path = Recursos/1.Brilinta/Videos/TicagrelorMecanismodeAccion.mp4; sourceTree = "<group>"; };
+ 17A854621495ABB300C0B901 /* VideoCorazon.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = VideoCorazon.mp4; path = Recursos/1.Brilinta/Videos/VideoCorazon.mp4; sourceTree = "<group>"; };
17FF58A5149583E20056C21F /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
17FF58AB149588DC0056C21F /* ResourceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceView.h; sourceTree = "<group>"; };
17FF58AC149588DC0056C21F /* ResourceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResourceView.m; sourceTree = "<group>"; };
@@ -167,15 +168,6 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 17FF58A1149581390056C21F /* Video */ = {
- isa = PBXGroup;
- children = (
- 17FF58A2149581510056C21F /* VideoViewController.h */,
- 17FF58A3149581510056C21F /* VideoViewController.m */,
- );
- name = Video;
- sourceTree = "<group>";
- };
17FF58A71495883B0056C21F /* Views */ = {
isa = PBXGroup;
children = (
@@ -218,7 +210,6 @@
isa = PBXGroup;
children = (
17FF58A71495883B0056C21F /* Views */,
- 17FF58A1149581390056C21F /* Video */,
AA3090CE14948EA5008C4C86 /* Assets */,
AA3090C014948BC7008C4C86 /* AppDelegate.h */,
AA3090C114948BC7008C4C86 /* AppDelegate.m */,
@@ -362,6 +353,8 @@
AAA3EEA31495659600DFFE8A /* Video */ = {
isa = PBXGroup;
children = (
+ 17A854611495ABB300C0B901 /* TicagrelorMecanismodeAccion.mp4 */,
+ 17A854621495ABB300C0B901 /* VideoCorazon.mp4 */,
);
name = Video;
sourceTree = "<group>";
@@ -485,6 +478,8 @@
AAA3EEAA14956A4500DFFE8A /* RAEstudioPlato.PDF in Resources */,
AAA3EEAD14956A8500DFFE8A /* AVOEtarjetonATORVASTATINA.pdf in Resources */,
AAA3EEAE14956A8500DFFE8A /* AVOEtarjetonesCOMBINACION.pdf in Resources */,
+ 17A854631495ABB300C0B901 /* TicagrelorMecanismodeAccion.mp4 in Resources */,
+ 17A854641495ABB300C0B901 /* VideoCorazon.mp4 in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -502,7 +497,6 @@
AAF0BEA014949B3400CB887D /* ResourceViewController.m in Sources */,
AAF0BFA4149561B600CB887D /* HelperViewController.m in Sources */,
AAA3EEC9149588D100DFFE8A /* ResourceManager.m in Sources */,
- 17FF58A4149581510056C21F /* VideoViewController.m in Sources */,
17FF58AD149588DC0056C21F /* ResourceView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -7,19 +7,22 @@
//
#import <UIKit/UIKit.h>
-#import "VideoViewController.h"
+
+#define pdf @"pdf"
+#define video @"mp4"
@interface ListViewController : UIViewController
{
UIButton *dismissButton;
UITableView *table;
NSMutableDictionary *resourceList;
+ NSString *fileType;
}
@property (nonatomic, retain) UIButton *dismissButton;
@property (nonatomic, retain) IBOutlet UITableView *table;
@property (nonatomic, retain) NSMutableDictionary *resourceList;
-
+@property (nonatomic, retain) NSString *fileType;
-(IBAction) dismiss;
@@ -8,9 +8,11 @@
#import "ListViewController.h"
#import "ResourceView.h"
+#import <MediaPlayer/MediaPlayer.h>
+#import "HelperViewController.h"
@implementation ListViewController
-@synthesize dismissButton,table, resourceList;
+@synthesize dismissButton,table, resourceList, fileType;
-(IBAction) dismiss{
[self dismissModalViewControllerAnimated:YES];
@@ -22,7 +24,8 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.resourceList = [NSMutableDictionary dictionary];
- [self.resourceList setObject:@"TicagrelorMecanismodeAccion" forKey:@"Ticagrelor Mecanismo de Acción"];
+ [self.resourceList setObject:@"TicagrelorMecanismodeAccion"
+ forKey:@"Ticagrelor Mecanismo de Acción"];
[self.resourceList setObject:@"VideoCorazon" forKey:@"Video Corazón"];
}
return self;
@@ -55,20 +58,38 @@ - (void)viewDidLoad
- (void) pushResourceViewControllerWithFile:(NSString*)file
{
- VideoViewController *video = [[VideoViewController alloc] initWithFrame:self.view.frame withFileToPlay:file];
- [self presentModalViewController:video animated:YES];
+ NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]
+ pathForResource:file ofType:fileType]];
+
+ if (fileType == pdf) {
+ QLPreviewController *controlador1 = [[QLPreviewController alloc] init];
+ HelperViewController *dummy = [[HelperViewController alloc] init];
+
+ dummy.documents=file;
+ controlador1.dataSource =dummy;
+ controlador1.delegate=dummy;
+ controlador1.currentPreviewItemIndex =0;
+
+ [self presentModalViewController:controlador1 animated:YES];
+
+ [controlador1 release];
+ } else {
+ MPMoviePlayerViewController *movController = [[MPMoviePlayerViewController alloc]
+ initWithContentURL:url];
+ [self presentMoviePlayerViewControllerAnimated:movController];
+ }
}
- (void) setResourceIconForButtonTag:(int)tag
{
NSString *resource = Nil;
+ fileType = pdf;
if (tag == 1) {
resource = @"botonVideos.png";
-
+ fileType = video;
} else if(tag == 2) {
resource = @"botonMaterialesExtra.png";
-
} else if(tag == 3) {
resource = @"botonAyudaVisual.png";
}
@@ -27,6 +27,9 @@ - (id) initWithFrame:(CGRect)frame withLocalResponder:(ListViewController *)cont
[[self layer] setShadowColor: [UIColor blackColor].CGColor];
[[self layer] setShadowOpacity: 0.6];
[[self layer] setCornerRadius: 5];
+ [self setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
+ self.contentEdgeInsets = UIEdgeInsetsMake(0, 20, 0, 0);
+
[self setTitleColor:UIColorFromRGB(0x524D46) forState:UIControlStateNormal];

0 comments on commit 9107904

Please sign in to comment.