This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define NavigationBar_HEIGHT 44 | |
| #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) | |
| #define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height) | |
| #define SAFE_RELEASE(x) [x release];x=nil | |
| #define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue] | |
| #define CurrentSystemVersion ([[UIDevice currentDevice] systemVersion]) | |
| #define CurrentLanguage ([[NSLocale preferredLanguages] objectAtIndex:0]) | |
| #define BACKGROUND_COLOR [UIColor colorWithRed:242.0/255.0 green:236.0/255.0 blue:231.0/255.0 alpha:1.0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (UIViewController *)topViewController{ | |
| return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
| } | |
| - (UIViewController *)topViewController:(UIViewController *)rootViewController | |
| { | |
| if (rootViewController.presentedViewController == nil) { | |
| return rootViewController; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "AVPlayer+MOAdditions.h" | |
| #include <CoreMedia/CMBase.h> | |
| #import "AVPlayerItem+MOAdditions.h" | |
| @implementation AVPlayer (MOAdditions) | |
| - (NSURL *)currentURL { | |
| AVAsset *asset = self.currentItem.asset; | |
| if ([asset isMemberOfClass:[AVURLAsset class]]) | |
| return ((AVURLAsset *)asset).URL; |