├── DirectorysViewController.h ├── DirectorysViewController.m ├── FilesViewController.h ├── FilesViewController.m ├── ImagesViewController.h ├── ImagesViewController.m ├── README.md ├── iFiles.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── BillyEllis.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── BillyEllis.xcuserdatad │ └── xcschemes │ ├── iFiles.xcscheme │ └── xcschememanagement.plist ├── iFiles ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ └── icon.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── CustomIOSAlertView.h ├── CustomIOSAlertView.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── iFilesTests ├── Info.plist └── iFilesTests.m └── iFilesUITests ├── Info.plist └── iFilesUITests.m /DirectorysViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DirectorysViewController.h 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DirectorysViewController : UIViewController 12 | 13 | { 14 | 15 | UITextField *textField; 16 | NSString *path; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /DirectorysViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DirectorysViewController.m 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import "DirectorysViewController.h" 10 | 11 | @interface DirectorysViewController () 12 | 13 | @end 14 | 15 | @implementation DirectorysViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | // Do any additional setup after loading the view. 21 | 22 | 23 | textField = [[UITextField alloc]initWithFrame:CGRectMake(20,70,self.view.frame.size.width - 40,30)]; 24 | 25 | textField.borderStyle = UITextBorderStyleRoundedRect; 26 | 27 | textField.placeholder = @"Enter a path to view"; 28 | 29 | [self.view addSubview:textField]; 30 | 31 | 32 | //button 33 | 34 | UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 35 | button.frame = CGRectMake(self.view.frame.size.width/2-50,self.view.frame.size.height*0.25-25,100,50); 36 | [button setTitle:@"View" forState:UIControlStateNormal]; 37 | [button addTarget:self action:@selector(viewFiles) forControlEvents:UIControlEventTouchUpInside]; 38 | [self.view addSubview:button]; 39 | 40 | } 41 | 42 | -(void)viewFiles{ 43 | 44 | path = textField.text; 45 | 46 | NSError *error = nil; 47 | 48 | NSArray *contentsArray = [[NSFileManager defaultManager]contentsOfDirectoryAtPath:path error:&error]; 49 | 50 | NSString *contentsString = [NSString stringWithFormat:@"%@",contentsArray]; 51 | 52 | NSString *titleString = [NSString stringWithFormat:@"%@%@", @"Contents of ", path]; 53 | 54 | //alert 55 | 56 | UIAlertView *alert = [[UIAlertView alloc]initWithTitle:titleString message:contentsString delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; 57 | 58 | [alert show]; 59 | 60 | } 61 | 62 | - (void)didReceiveMemoryWarning { 63 | [super didReceiveMemoryWarning]; 64 | // Dispose of any resources that can be recreated. 65 | } 66 | 67 | /* 68 | #pragma mark - Navigation 69 | 70 | // In a storyboard-based application, you will often want to do a little preparation before navigation 71 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 72 | // Get the new view controller using [segue destinationViewController]. 73 | // Pass the selected object to the new view controller. 74 | } 75 | */ 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /FilesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FilesViewController.h 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FilesViewController : UIViewController 12 | 13 | { 14 | 15 | UITextField *textField; 16 | NSString *path; 17 | } 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /FilesViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FilesViewController.m 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import "FilesViewController.h" 10 | 11 | @interface FilesViewController () 12 | 13 | @end 14 | 15 | @implementation FilesViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | 21 | textField = [[UITextField alloc]initWithFrame:CGRectMake(20,70,self.view.frame.size.width - 40,30)]; 22 | 23 | textField.borderStyle = UITextBorderStyleRoundedRect; 24 | 25 | textField.placeholder = @"Enter a path of file to view"; 26 | 27 | [self.view addSubview:textField]; 28 | 29 | 30 | //button 31 | 32 | UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 33 | button.frame = CGRectMake(self.view.frame.size.width/2-50,self.view.frame.size.height*0.25-25,100,50); 34 | [button setTitle:@"View" forState:UIControlStateNormal]; 35 | [button addTarget:self action:@selector(viewFiles) forControlEvents:UIControlEventTouchUpInside]; 36 | [self.view addSubview:button]; 37 | 38 | } 39 | 40 | -(void)viewFiles{ 41 | 42 | path = textField.text; 43 | 44 | NSError *error = nil; 45 | 46 | //NSArray *contentsArray = [[NSFileManager defaultManager]contentsOfDirectoryAtPath:path error:&error]; 47 | 48 | NSString *txtFilePath = textField.text; 49 | 50 | NSString *contentsArray = [NSString stringWithContentsOfFile:txtFilePath encoding:NSUTF8StringEncoding error:NULL]; 51 | 52 | NSString *contentsString = [NSString stringWithFormat:@"%@",contentsArray]; 53 | 54 | NSString *titleString = [NSString stringWithFormat:@"%@%@", @"Contents of ", txtFilePath]; 55 | 56 | //alert 57 | 58 | UIAlertView *alert = [[UIAlertView alloc]initWithTitle:titleString message:contentsString delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; 59 | 60 | [alert show]; 61 | 62 | 63 | } 64 | 65 | - (void)didReceiveMemoryWarning { 66 | [super didReceiveMemoryWarning]; 67 | // Dispose of any resources that can be recreated. 68 | } 69 | 70 | /* 71 | #pragma mark - Navigation 72 | 73 | // In a storyboard-based application, you will often want to do a little preparation before navigation 74 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 75 | // Get the new view controller using [segue destinationViewController]. 76 | // Pass the selected object to the new view controller. 77 | } 78 | */ 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /ImagesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImagesViewController.h 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ImagesViewController : UIViewController 12 | 13 | { 14 | 15 | UITextField *textField; 16 | NSString *path; 17 | IBOutlet UIImageView *theImage; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ImagesViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ImagesViewController.m 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import "ImagesViewController.h" 10 | #import "CustomIOSAlertView.h" 11 | 12 | @interface ImagesViewController () 13 | 14 | @end 15 | 16 | @implementation ImagesViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | 22 | textField = [[UITextField alloc]initWithFrame:CGRectMake(20,70,self.view.frame.size.width - 40,30)]; 23 | 24 | textField.borderStyle = UITextBorderStyleRoundedRect; 25 | 26 | textField.placeholder = @"Enter a path of image to view"; 27 | 28 | [self.view addSubview:textField]; 29 | 30 | 31 | //button 32 | 33 | UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 34 | button.frame = CGRectMake(self.view.frame.size.width/2-50,self.view.frame.size.height*0.25-25,100,50); 35 | [button setTitle:@"View" forState:UIControlStateNormal]; 36 | [button addTarget:self action:@selector(viewFiles) forControlEvents:UIControlEventTouchUpInside]; 37 | [self.view addSubview:button]; 38 | 39 | } 40 | 41 | -(void)viewFiles{ 42 | 43 | path = textField.text; 44 | 45 | NSError *error = nil; 46 | 47 | //NSArray *contentsArray = [[NSFileManager defaultManager]contentsOfDirectoryAtPath:path error:&error]; 48 | 49 | NSString *txtFilePath = textField.text; 50 | 51 | NSString *contentsArray = [NSString stringWithContentsOfFile:txtFilePath encoding:NSUTF8StringEncoding error:NULL]; 52 | 53 | NSString *contentsString = [NSString stringWithFormat:@"%@",contentsArray]; 54 | 55 | NSString *titleString = [NSString stringWithFormat:@"%@%@", @"Contents of ", txtFilePath]; 56 | 57 | //alert 58 | 59 | CustomIOSAlertView *alertView = [[CustomIOSAlertView alloc] init]; 60 | 61 | // Add some custom content to the alert view 62 | [alertView setContainerView:[self createDemoView]]; 63 | 64 | // Modify the parameters 65 | [alertView setButtonTitles:[NSMutableArray arrayWithObjects:@"Dismiss", nil]]; 66 | [alertView setDelegate:self]; 67 | 68 | // You may use a Block, rather than a delegate. 69 | [alertView setOnButtonTouchUpInside:^(CustomIOSAlertView *alertView, int buttonIndex) { 70 | NSLog(@"Block: Button at position %d is clicked on alertView %d.", buttonIndex, (int)[alertView tag]); 71 | [alertView close]; 72 | }]; 73 | 74 | [alertView setUseMotionEffects:true]; 75 | 76 | // And launch the dialog 77 | [alertView show]; 78 | 79 | [textField resignFirstResponder]; 80 | 81 | 82 | //image 83 | 84 | /*UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 200, 200)]; 85 | image.image = [UIImage imageWithContentsOfFile:path]; 86 | 87 | [alert addSubview:image]; 88 | 89 | [alert show]; 90 | 91 | theImage.image = [UIImage imageWithContentsOfFile:path];*/ 92 | 93 | } 94 | 95 | - (void)customIOS7dialogButtonTouchUpInside: (CustomIOSAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex 96 | { 97 | NSLog(@"Alert closed"); 98 | [alertView close]; 99 | } 100 | 101 | 102 | - (UIView *)createDemoView 103 | { 104 | UIView *demoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 180, 180)]; 105 | 106 | UILabel *nilLabel = [[UILabel alloc]initWithFrame:CGRectMake(30, 30,100, 40)]; 107 | nilLabel.text = @"null"; 108 | [demoView addSubview:nilLabel]; 109 | 110 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 150, 150)]; 111 | [imageView setImage:[UIImage imageWithContentsOfFile:path]]; 112 | [demoView addSubview:imageView]; 113 | 114 | return demoView; 115 | } 116 | 117 | 118 | - (void)didReceiveMemoryWarning { 119 | [super didReceiveMemoryWarning]; 120 | // Dispose of any resources that can be recreated. 121 | } 122 | 123 | /* 124 | #pragma mark - Navigation 125 | 126 | // In a storyboard-based application, you will often want to do a little preparation before navigation 127 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 128 | // Get the new view controller using [segue destinationViewController]. 129 | // Pass the selected object to the new view controller. 130 | } 131 | */ 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iOS-File-Explorer 2 | No-jailbreak file explorer application for iOS 3 | -------------------------------------------------------------------------------- /iFiles.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F025C04F1C517690008F9DAE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C04E1C517690008F9DAE /* main.m */; }; 11 | F025C0521C517690008F9DAE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C0511C517690008F9DAE /* AppDelegate.m */; }; 12 | F025C0551C517690008F9DAE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C0541C517690008F9DAE /* ViewController.m */; }; 13 | F025C0581C517690008F9DAE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F025C0561C517690008F9DAE /* Main.storyboard */; }; 14 | F025C05A1C517690008F9DAE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F025C0591C517690008F9DAE /* Assets.xcassets */; }; 15 | F025C05D1C517690008F9DAE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F025C05B1C517690008F9DAE /* LaunchScreen.storyboard */; }; 16 | F025C0681C517690008F9DAE /* iFilesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C0671C517690008F9DAE /* iFilesTests.m */; }; 17 | F025C0731C517690008F9DAE /* iFilesUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C0721C517690008F9DAE /* iFilesUITests.m */; }; 18 | F025C0821C51775B008F9DAE /* FilesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C0811C51775B008F9DAE /* FilesViewController.m */; }; 19 | F025C0851C517767008F9DAE /* DirectorysViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C0841C517767008F9DAE /* DirectorysViewController.m */; }; 20 | F025C0881C517771008F9DAE /* ImagesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C0871C517771008F9DAE /* ImagesViewController.m */; }; 21 | F025C08B1C517C0B008F9DAE /* CustomIOSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = F025C08A1C517C0B008F9DAE /* CustomIOSAlertView.m */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | F025C0641C517690008F9DAE /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = F025C0421C51768F008F9DAE /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = F025C0491C51768F008F9DAE; 30 | remoteInfo = iFiles; 31 | }; 32 | F025C06F1C517690008F9DAE /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = F025C0421C51768F008F9DAE /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = F025C0491C51768F008F9DAE; 37 | remoteInfo = iFiles; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | F025C04A1C51768F008F9DAE /* iFiles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iFiles.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | F025C04E1C517690008F9DAE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 44 | F025C0501C517690008F9DAE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 45 | F025C0511C517690008F9DAE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 46 | F025C0531C517690008F9DAE /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 47 | F025C0541C517690008F9DAE /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 48 | F025C0571C517690008F9DAE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | F025C0591C517690008F9DAE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | F025C05C1C517690008F9DAE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | F025C05E1C517690008F9DAE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | F025C0631C517690008F9DAE /* iFilesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iFilesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | F025C0671C517690008F9DAE /* iFilesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iFilesTests.m; sourceTree = ""; }; 54 | F025C0691C517690008F9DAE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | F025C06E1C517690008F9DAE /* iFilesUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iFilesUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | F025C0721C517690008F9DAE /* iFilesUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iFilesUITests.m; sourceTree = ""; }; 57 | F025C0741C517690008F9DAE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | F025C0801C51775B008F9DAE /* FilesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilesViewController.h; path = ../FilesViewController.h; sourceTree = ""; }; 59 | F025C0811C51775B008F9DAE /* FilesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FilesViewController.m; path = ../FilesViewController.m; sourceTree = ""; }; 60 | F025C0831C517767008F9DAE /* DirectorysViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectorysViewController.h; path = ../DirectorysViewController.h; sourceTree = ""; }; 61 | F025C0841C517767008F9DAE /* DirectorysViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DirectorysViewController.m; path = ../DirectorysViewController.m; sourceTree = ""; }; 62 | F025C0861C517771008F9DAE /* ImagesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ImagesViewController.h; path = ../ImagesViewController.h; sourceTree = ""; }; 63 | F025C0871C517771008F9DAE /* ImagesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImagesViewController.m; path = ../ImagesViewController.m; sourceTree = ""; }; 64 | F025C0891C517C0B008F9DAE /* CustomIOSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomIOSAlertView.h; sourceTree = ""; }; 65 | F025C08A1C517C0B008F9DAE /* CustomIOSAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomIOSAlertView.m; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | F025C0471C51768F008F9DAE /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | F025C0601C517690008F9DAE /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | F025C06B1C517690008F9DAE /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | /* End PBXFrameworksBuildPhase section */ 91 | 92 | /* Begin PBXGroup section */ 93 | F025C0411C51768F008F9DAE = { 94 | isa = PBXGroup; 95 | children = ( 96 | F025C04C1C517690008F9DAE /* iFiles */, 97 | F025C0661C517690008F9DAE /* iFilesTests */, 98 | F025C0711C517690008F9DAE /* iFilesUITests */, 99 | F025C04B1C51768F008F9DAE /* Products */, 100 | ); 101 | sourceTree = ""; 102 | }; 103 | F025C04B1C51768F008F9DAE /* Products */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | F025C04A1C51768F008F9DAE /* iFiles.app */, 107 | F025C0631C517690008F9DAE /* iFilesTests.xctest */, 108 | F025C06E1C517690008F9DAE /* iFilesUITests.xctest */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | F025C04C1C517690008F9DAE /* iFiles */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | F025C0501C517690008F9DAE /* AppDelegate.h */, 117 | F025C0511C517690008F9DAE /* AppDelegate.m */, 118 | F025C0891C517C0B008F9DAE /* CustomIOSAlertView.h */, 119 | F025C08A1C517C0B008F9DAE /* CustomIOSAlertView.m */, 120 | F025C0531C517690008F9DAE /* ViewController.h */, 121 | F025C0541C517690008F9DAE /* ViewController.m */, 122 | F025C0831C517767008F9DAE /* DirectorysViewController.h */, 123 | F025C0841C517767008F9DAE /* DirectorysViewController.m */, 124 | F025C0861C517771008F9DAE /* ImagesViewController.h */, 125 | F025C0871C517771008F9DAE /* ImagesViewController.m */, 126 | F025C0801C51775B008F9DAE /* FilesViewController.h */, 127 | F025C0811C51775B008F9DAE /* FilesViewController.m */, 128 | F025C0561C517690008F9DAE /* Main.storyboard */, 129 | F025C0591C517690008F9DAE /* Assets.xcassets */, 130 | F025C05B1C517690008F9DAE /* LaunchScreen.storyboard */, 131 | F025C05E1C517690008F9DAE /* Info.plist */, 132 | F025C04D1C517690008F9DAE /* Supporting Files */, 133 | ); 134 | path = iFiles; 135 | sourceTree = ""; 136 | }; 137 | F025C04D1C517690008F9DAE /* Supporting Files */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | F025C04E1C517690008F9DAE /* main.m */, 141 | ); 142 | name = "Supporting Files"; 143 | sourceTree = ""; 144 | }; 145 | F025C0661C517690008F9DAE /* iFilesTests */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | F025C0671C517690008F9DAE /* iFilesTests.m */, 149 | F025C0691C517690008F9DAE /* Info.plist */, 150 | ); 151 | path = iFilesTests; 152 | sourceTree = ""; 153 | }; 154 | F025C0711C517690008F9DAE /* iFilesUITests */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | F025C0721C517690008F9DAE /* iFilesUITests.m */, 158 | F025C0741C517690008F9DAE /* Info.plist */, 159 | ); 160 | path = iFilesUITests; 161 | sourceTree = ""; 162 | }; 163 | /* End PBXGroup section */ 164 | 165 | /* Begin PBXNativeTarget section */ 166 | F025C0491C51768F008F9DAE /* iFiles */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = F025C0771C517690008F9DAE /* Build configuration list for PBXNativeTarget "iFiles" */; 169 | buildPhases = ( 170 | F025C0461C51768F008F9DAE /* Sources */, 171 | F025C0471C51768F008F9DAE /* Frameworks */, 172 | F025C0481C51768F008F9DAE /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | ); 178 | name = iFiles; 179 | productName = iFiles; 180 | productReference = F025C04A1C51768F008F9DAE /* iFiles.app */; 181 | productType = "com.apple.product-type.application"; 182 | }; 183 | F025C0621C517690008F9DAE /* iFilesTests */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = F025C07A1C517690008F9DAE /* Build configuration list for PBXNativeTarget "iFilesTests" */; 186 | buildPhases = ( 187 | F025C05F1C517690008F9DAE /* Sources */, 188 | F025C0601C517690008F9DAE /* Frameworks */, 189 | F025C0611C517690008F9DAE /* Resources */, 190 | ); 191 | buildRules = ( 192 | ); 193 | dependencies = ( 194 | F025C0651C517690008F9DAE /* PBXTargetDependency */, 195 | ); 196 | name = iFilesTests; 197 | productName = iFilesTests; 198 | productReference = F025C0631C517690008F9DAE /* iFilesTests.xctest */; 199 | productType = "com.apple.product-type.bundle.unit-test"; 200 | }; 201 | F025C06D1C517690008F9DAE /* iFilesUITests */ = { 202 | isa = PBXNativeTarget; 203 | buildConfigurationList = F025C07D1C517690008F9DAE /* Build configuration list for PBXNativeTarget "iFilesUITests" */; 204 | buildPhases = ( 205 | F025C06A1C517690008F9DAE /* Sources */, 206 | F025C06B1C517690008F9DAE /* Frameworks */, 207 | F025C06C1C517690008F9DAE /* Resources */, 208 | ); 209 | buildRules = ( 210 | ); 211 | dependencies = ( 212 | F025C0701C517690008F9DAE /* PBXTargetDependency */, 213 | ); 214 | name = iFilesUITests; 215 | productName = iFilesUITests; 216 | productReference = F025C06E1C517690008F9DAE /* iFilesUITests.xctest */; 217 | productType = "com.apple.product-type.bundle.ui-testing"; 218 | }; 219 | /* End PBXNativeTarget section */ 220 | 221 | /* Begin PBXProject section */ 222 | F025C0421C51768F008F9DAE /* Project object */ = { 223 | isa = PBXProject; 224 | attributes = { 225 | LastUpgradeCheck = 0720; 226 | ORGANIZATIONNAME = "Billy Ellis"; 227 | TargetAttributes = { 228 | F025C0491C51768F008F9DAE = { 229 | CreatedOnToolsVersion = 7.2; 230 | DevelopmentTeam = 2V66PT3FLF; 231 | }; 232 | F025C0621C517690008F9DAE = { 233 | CreatedOnToolsVersion = 7.2; 234 | TestTargetID = F025C0491C51768F008F9DAE; 235 | }; 236 | F025C06D1C517690008F9DAE = { 237 | CreatedOnToolsVersion = 7.2; 238 | TestTargetID = F025C0491C51768F008F9DAE; 239 | }; 240 | }; 241 | }; 242 | buildConfigurationList = F025C0451C51768F008F9DAE /* Build configuration list for PBXProject "iFiles" */; 243 | compatibilityVersion = "Xcode 3.2"; 244 | developmentRegion = English; 245 | hasScannedForEncodings = 0; 246 | knownRegions = ( 247 | en, 248 | Base, 249 | ); 250 | mainGroup = F025C0411C51768F008F9DAE; 251 | productRefGroup = F025C04B1C51768F008F9DAE /* Products */; 252 | projectDirPath = ""; 253 | projectRoot = ""; 254 | targets = ( 255 | F025C0491C51768F008F9DAE /* iFiles */, 256 | F025C0621C517690008F9DAE /* iFilesTests */, 257 | F025C06D1C517690008F9DAE /* iFilesUITests */, 258 | ); 259 | }; 260 | /* End PBXProject section */ 261 | 262 | /* Begin PBXResourcesBuildPhase section */ 263 | F025C0481C51768F008F9DAE /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | F025C05D1C517690008F9DAE /* LaunchScreen.storyboard in Resources */, 268 | F025C05A1C517690008F9DAE /* Assets.xcassets in Resources */, 269 | F025C0581C517690008F9DAE /* Main.storyboard in Resources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | F025C0611C517690008F9DAE /* Resources */ = { 274 | isa = PBXResourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | F025C06C1C517690008F9DAE /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXResourcesBuildPhase section */ 288 | 289 | /* Begin PBXSourcesBuildPhase section */ 290 | F025C0461C51768F008F9DAE /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | F025C0551C517690008F9DAE /* ViewController.m in Sources */, 295 | F025C0851C517767008F9DAE /* DirectorysViewController.m in Sources */, 296 | F025C0521C517690008F9DAE /* AppDelegate.m in Sources */, 297 | F025C08B1C517C0B008F9DAE /* CustomIOSAlertView.m in Sources */, 298 | F025C0821C51775B008F9DAE /* FilesViewController.m in Sources */, 299 | F025C0881C517771008F9DAE /* ImagesViewController.m in Sources */, 300 | F025C04F1C517690008F9DAE /* main.m in Sources */, 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | }; 304 | F025C05F1C517690008F9DAE /* Sources */ = { 305 | isa = PBXSourcesBuildPhase; 306 | buildActionMask = 2147483647; 307 | files = ( 308 | F025C0681C517690008F9DAE /* iFilesTests.m in Sources */, 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | }; 312 | F025C06A1C517690008F9DAE /* Sources */ = { 313 | isa = PBXSourcesBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | F025C0731C517690008F9DAE /* iFilesUITests.m in Sources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | /* End PBXSourcesBuildPhase section */ 321 | 322 | /* Begin PBXTargetDependency section */ 323 | F025C0651C517690008F9DAE /* PBXTargetDependency */ = { 324 | isa = PBXTargetDependency; 325 | target = F025C0491C51768F008F9DAE /* iFiles */; 326 | targetProxy = F025C0641C517690008F9DAE /* PBXContainerItemProxy */; 327 | }; 328 | F025C0701C517690008F9DAE /* PBXTargetDependency */ = { 329 | isa = PBXTargetDependency; 330 | target = F025C0491C51768F008F9DAE /* iFiles */; 331 | targetProxy = F025C06F1C517690008F9DAE /* PBXContainerItemProxy */; 332 | }; 333 | /* End PBXTargetDependency section */ 334 | 335 | /* Begin PBXVariantGroup section */ 336 | F025C0561C517690008F9DAE /* Main.storyboard */ = { 337 | isa = PBXVariantGroup; 338 | children = ( 339 | F025C0571C517690008F9DAE /* Base */, 340 | ); 341 | name = Main.storyboard; 342 | sourceTree = ""; 343 | }; 344 | F025C05B1C517690008F9DAE /* LaunchScreen.storyboard */ = { 345 | isa = PBXVariantGroup; 346 | children = ( 347 | F025C05C1C517690008F9DAE /* Base */, 348 | ); 349 | name = LaunchScreen.storyboard; 350 | sourceTree = ""; 351 | }; 352 | /* End PBXVariantGroup section */ 353 | 354 | /* Begin XCBuildConfiguration section */ 355 | F025C0751C517690008F9DAE /* Debug */ = { 356 | isa = XCBuildConfiguration; 357 | buildSettings = { 358 | ALWAYS_SEARCH_USER_PATHS = NO; 359 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 360 | CLANG_CXX_LIBRARY = "libc++"; 361 | CLANG_ENABLE_MODULES = YES; 362 | CLANG_ENABLE_OBJC_ARC = YES; 363 | CLANG_WARN_BOOL_CONVERSION = YES; 364 | CLANG_WARN_CONSTANT_CONVERSION = YES; 365 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 366 | CLANG_WARN_EMPTY_BODY = YES; 367 | CLANG_WARN_ENUM_CONVERSION = YES; 368 | CLANG_WARN_INT_CONVERSION = YES; 369 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 370 | CLANG_WARN_UNREACHABLE_CODE = YES; 371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 372 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 373 | COPY_PHASE_STRIP = NO; 374 | DEBUG_INFORMATION_FORMAT = dwarf; 375 | ENABLE_STRICT_OBJC_MSGSEND = YES; 376 | ENABLE_TESTABILITY = YES; 377 | GCC_C_LANGUAGE_STANDARD = gnu99; 378 | GCC_DYNAMIC_NO_PIC = NO; 379 | GCC_NO_COMMON_BLOCKS = YES; 380 | GCC_OPTIMIZATION_LEVEL = 0; 381 | GCC_PREPROCESSOR_DEFINITIONS = ( 382 | "DEBUG=1", 383 | "$(inherited)", 384 | ); 385 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 386 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 387 | GCC_WARN_UNDECLARED_SELECTOR = YES; 388 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 389 | GCC_WARN_UNUSED_FUNCTION = YES; 390 | GCC_WARN_UNUSED_VARIABLE = YES; 391 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 392 | MTL_ENABLE_DEBUG_INFO = YES; 393 | ONLY_ACTIVE_ARCH = YES; 394 | SDKROOT = iphoneos; 395 | }; 396 | name = Debug; 397 | }; 398 | F025C0761C517690008F9DAE /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 403 | CLANG_CXX_LIBRARY = "libc++"; 404 | CLANG_ENABLE_MODULES = YES; 405 | CLANG_ENABLE_OBJC_ARC = YES; 406 | CLANG_WARN_BOOL_CONVERSION = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 409 | CLANG_WARN_EMPTY_BODY = YES; 410 | CLANG_WARN_ENUM_CONVERSION = YES; 411 | CLANG_WARN_INT_CONVERSION = YES; 412 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | COPY_PHASE_STRIP = NO; 417 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 418 | ENABLE_NS_ASSERTIONS = NO; 419 | ENABLE_STRICT_OBJC_MSGSEND = YES; 420 | GCC_C_LANGUAGE_STANDARD = gnu99; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 429 | MTL_ENABLE_DEBUG_INFO = NO; 430 | SDKROOT = iphoneos; 431 | VALIDATE_PRODUCT = YES; 432 | }; 433 | name = Release; 434 | }; 435 | F025C0781C517690008F9DAE /* Debug */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | CODE_SIGN_IDENTITY = "iPhone Developer"; 440 | INFOPLIST_FILE = iFiles/Info.plist; 441 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 442 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 443 | PRODUCT_BUNDLE_IDENTIFIER = com.billyellis.iFiles; 444 | PRODUCT_NAME = "$(TARGET_NAME)"; 445 | }; 446 | name = Debug; 447 | }; 448 | F025C0791C517690008F9DAE /* Release */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 452 | CODE_SIGN_IDENTITY = "iPhone Developer"; 453 | INFOPLIST_FILE = iFiles/Info.plist; 454 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 456 | PRODUCT_BUNDLE_IDENTIFIER = com.billyellis.iFiles; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | }; 459 | name = Release; 460 | }; 461 | F025C07B1C517690008F9DAE /* Debug */ = { 462 | isa = XCBuildConfiguration; 463 | buildSettings = { 464 | BUNDLE_LOADER = "$(TEST_HOST)"; 465 | INFOPLIST_FILE = iFilesTests/Info.plist; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 467 | PRODUCT_BUNDLE_IDENTIFIER = com.billyellis.iFilesTests; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iFiles.app/iFiles"; 470 | }; 471 | name = Debug; 472 | }; 473 | F025C07C1C517690008F9DAE /* Release */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | BUNDLE_LOADER = "$(TEST_HOST)"; 477 | INFOPLIST_FILE = iFilesTests/Info.plist; 478 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 479 | PRODUCT_BUNDLE_IDENTIFIER = com.billyellis.iFilesTests; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iFiles.app/iFiles"; 482 | }; 483 | name = Release; 484 | }; 485 | F025C07E1C517690008F9DAE /* Debug */ = { 486 | isa = XCBuildConfiguration; 487 | buildSettings = { 488 | INFOPLIST_FILE = iFilesUITests/Info.plist; 489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 490 | PRODUCT_BUNDLE_IDENTIFIER = com.billyellis.iFilesUITests; 491 | PRODUCT_NAME = "$(TARGET_NAME)"; 492 | TEST_TARGET_NAME = iFiles; 493 | USES_XCTRUNNER = YES; 494 | }; 495 | name = Debug; 496 | }; 497 | F025C07F1C517690008F9DAE /* Release */ = { 498 | isa = XCBuildConfiguration; 499 | buildSettings = { 500 | INFOPLIST_FILE = iFilesUITests/Info.plist; 501 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 502 | PRODUCT_BUNDLE_IDENTIFIER = com.billyellis.iFilesUITests; 503 | PRODUCT_NAME = "$(TARGET_NAME)"; 504 | TEST_TARGET_NAME = iFiles; 505 | USES_XCTRUNNER = YES; 506 | }; 507 | name = Release; 508 | }; 509 | /* End XCBuildConfiguration section */ 510 | 511 | /* Begin XCConfigurationList section */ 512 | F025C0451C51768F008F9DAE /* Build configuration list for PBXProject "iFiles" */ = { 513 | isa = XCConfigurationList; 514 | buildConfigurations = ( 515 | F025C0751C517690008F9DAE /* Debug */, 516 | F025C0761C517690008F9DAE /* Release */, 517 | ); 518 | defaultConfigurationIsVisible = 0; 519 | defaultConfigurationName = Release; 520 | }; 521 | F025C0771C517690008F9DAE /* Build configuration list for PBXNativeTarget "iFiles" */ = { 522 | isa = XCConfigurationList; 523 | buildConfigurations = ( 524 | F025C0781C517690008F9DAE /* Debug */, 525 | F025C0791C517690008F9DAE /* Release */, 526 | ); 527 | defaultConfigurationIsVisible = 0; 528 | }; 529 | F025C07A1C517690008F9DAE /* Build configuration list for PBXNativeTarget "iFilesTests" */ = { 530 | isa = XCConfigurationList; 531 | buildConfigurations = ( 532 | F025C07B1C517690008F9DAE /* Debug */, 533 | F025C07C1C517690008F9DAE /* Release */, 534 | ); 535 | defaultConfigurationIsVisible = 0; 536 | }; 537 | F025C07D1C517690008F9DAE /* Build configuration list for PBXNativeTarget "iFilesUITests" */ = { 538 | isa = XCConfigurationList; 539 | buildConfigurations = ( 540 | F025C07E1C517690008F9DAE /* Debug */, 541 | F025C07F1C517690008F9DAE /* Release */, 542 | ); 543 | defaultConfigurationIsVisible = 0; 544 | }; 545 | /* End XCConfigurationList section */ 546 | }; 547 | rootObject = F025C0421C51768F008F9DAE /* Project object */; 548 | } 549 | -------------------------------------------------------------------------------- /iFiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iFiles.xcodeproj/project.xcworkspace/xcuserdata/BillyEllis.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Billy-Ellis/iOS-File-Explorer/2c55beb25f5cc7835422d6dfba6ac55fcf90814c/iFiles.xcodeproj/project.xcworkspace/xcuserdata/BillyEllis.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /iFiles.xcodeproj/xcuserdata/BillyEllis.xcuserdatad/xcschemes/iFiles.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /iFiles.xcodeproj/xcuserdata/BillyEllis.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | iFiles.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F025C0491C51768F008F9DAE 16 | 17 | primary 18 | 19 | 20 | F025C0621C517690008F9DAE 21 | 22 | primary 23 | 24 | 25 | F025C06D1C517690008F9DAE 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /iFiles/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /iFiles/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /iFiles/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "size" : "60x60", 25 | "idiom" : "iphone", 26 | "filename" : "icon.png", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "idiom" : "iphone", 31 | "size" : "60x60", 32 | "scale" : "3x" 33 | } 34 | ], 35 | "info" : { 36 | "version" : 1, 37 | "author" : "xcode" 38 | } 39 | } -------------------------------------------------------------------------------- /iFiles/Assets.xcassets/AppIcon.appiconset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Billy-Ellis/iOS-File-Explorer/2c55beb25f5cc7835422d6dfba6ac55fcf90814c/iFiles/Assets.xcassets/AppIcon.appiconset/icon.png -------------------------------------------------------------------------------- /iFiles/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /iFiles/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 31 | 42 | 52 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /iFiles/CustomIOSAlertView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CustomIOSAlertView.h 3 | // CustomIOSAlertView 4 | // 5 | // Created by Richard on 20/09/2013. 6 | // Copyright (c) 2013-2015 Wimagguc. 7 | // 8 | // Lincesed under The MIT License (MIT) 9 | // http://opensource.org/licenses/MIT 10 | // 11 | 12 | #import 13 | 14 | @protocol CustomIOSAlertViewDelegate 15 | 16 | - (void)customIOS7dialogButtonTouchUpInside:(id)alertView clickedButtonAtIndex:(NSInteger)buttonIndex; 17 | 18 | @end 19 | 20 | @interface CustomIOSAlertView : UIView 21 | 22 | @property (nonatomic, retain) UIView *parentView; // The parent view this 'dialog' is attached to 23 | @property (nonatomic, retain) UIView *dialogView; // Dialog's container view 24 | @property (nonatomic, retain) UIView *containerView; // Container within the dialog (place your ui elements here) 25 | 26 | @property (nonatomic, assign) id delegate; 27 | @property (nonatomic, retain) NSArray *buttonTitles; 28 | @property (nonatomic, assign) BOOL useMotionEffects; 29 | 30 | @property (copy) void (^onButtonTouchUpInside)(CustomIOSAlertView *alertView, int buttonIndex) ; 31 | 32 | - (id)init; 33 | 34 | /*! 35 | DEPRECATED: Use the [CustomIOSAlertView init] method without passing a parent view. 36 | */ 37 | - (id)initWithParentView: (UIView *)_parentView __attribute__ ((deprecated)); 38 | 39 | - (void)show; 40 | - (void)close; 41 | 42 | - (IBAction)customIOS7dialogButtonTouchUpInside:(id)sender; 43 | - (void)setOnButtonTouchUpInside:(void (^)(CustomIOSAlertView *alertView, int buttonIndex))onButtonTouchUpInside; 44 | 45 | - (void)deviceOrientationDidChange: (NSNotification *)notification; 46 | - (void)dealloc; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /iFiles/CustomIOSAlertView.m: -------------------------------------------------------------------------------- 1 | // 2 | // CustomIOSAlertView.m 3 | // CustomIOSAlertView 4 | // 5 | // Created by Richard on 20/09/2013. 6 | // Copyright (c) 2013-2015 Wimagguc. 7 | // 8 | // Lincesed under The MIT License (MIT) 9 | // http://opensource.org/licenses/MIT 10 | // 11 | 12 | #import "CustomIOSAlertView.h" 13 | #import 14 | 15 | const static CGFloat kCustomIOSAlertViewDefaultButtonHeight = 50; 16 | const static CGFloat kCustomIOSAlertViewDefaultButtonSpacerHeight = 1; 17 | const static CGFloat kCustomIOSAlertViewCornerRadius = 7; 18 | const static CGFloat kCustomIOS7MotionEffectExtent = 10.0; 19 | 20 | @implementation CustomIOSAlertView 21 | 22 | CGFloat buttonHeight = 0; 23 | CGFloat buttonSpacerHeight = 0; 24 | 25 | @synthesize parentView, containerView, dialogView, onButtonTouchUpInside; 26 | @synthesize delegate; 27 | @synthesize buttonTitles; 28 | @synthesize useMotionEffects; 29 | 30 | - (id)initWithParentView: (UIView *)_parentView 31 | { 32 | self = [self init]; 33 | if (_parentView) { 34 | self.frame = _parentView.frame; 35 | self.parentView = _parentView; 36 | } 37 | return self; 38 | } 39 | 40 | - (id)init 41 | { 42 | self = [super init]; 43 | if (self) { 44 | self.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height); 45 | 46 | delegate = self; 47 | useMotionEffects = false; 48 | buttonTitles = @[@"Close"]; 49 | 50 | [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; 51 | 52 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange:) name:UIDeviceOrientationDidChangeNotification object:nil]; 53 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; 54 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; 55 | } 56 | return self; 57 | } 58 | 59 | // Create the dialog view, and animate opening the dialog 60 | - (void)show 61 | { 62 | dialogView = [self createContainerView]; 63 | 64 | dialogView.layer.shouldRasterize = YES; 65 | dialogView.layer.rasterizationScale = [[UIScreen mainScreen] scale]; 66 | 67 | self.layer.shouldRasterize = YES; 68 | self.layer.rasterizationScale = [[UIScreen mainScreen] scale]; 69 | 70 | #if (defined(__IPHONE_7_0)) 71 | if (useMotionEffects) { 72 | [self applyMotionEffects]; 73 | } 74 | #endif 75 | 76 | self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0]; 77 | 78 | [self addSubview:dialogView]; 79 | 80 | // Can be attached to a view or to the top most window 81 | // Attached to a view: 82 | if (parentView != NULL) { 83 | [parentView addSubview:self]; 84 | 85 | // Attached to the top most window 86 | } else { 87 | 88 | // On iOS7, calculate with orientation 89 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) { 90 | 91 | UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 92 | switch (interfaceOrientation) { 93 | case UIInterfaceOrientationLandscapeLeft: 94 | self.transform = CGAffineTransformMakeRotation(M_PI * 270.0 / 180.0); 95 | break; 96 | 97 | case UIInterfaceOrientationLandscapeRight: 98 | self.transform = CGAffineTransformMakeRotation(M_PI * 90.0 / 180.0); 99 | break; 100 | 101 | case UIInterfaceOrientationPortraitUpsideDown: 102 | self.transform = CGAffineTransformMakeRotation(M_PI * 180.0 / 180.0); 103 | break; 104 | 105 | default: 106 | break; 107 | } 108 | 109 | [self setFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; 110 | 111 | // On iOS8, just place the dialog in the middle 112 | } else { 113 | 114 | CGSize screenSize = [self countScreenSize]; 115 | CGSize dialogSize = [self countDialogSize]; 116 | CGSize keyboardSize = CGSizeMake(0, 0); 117 | 118 | dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height); 119 | 120 | } 121 | 122 | [[[[UIApplication sharedApplication] windows] firstObject] addSubview:self]; 123 | } 124 | 125 | dialogView.layer.opacity = 0.5f; 126 | dialogView.layer.transform = CATransform3DMakeScale(1.3f, 1.3f, 1.0); 127 | 128 | [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionCurveEaseInOut 129 | animations:^{ 130 | self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.4f]; 131 | dialogView.layer.opacity = 1.0f; 132 | dialogView.layer.transform = CATransform3DMakeScale(1, 1, 1); 133 | } 134 | completion:NULL 135 | ]; 136 | 137 | } 138 | 139 | // Button has been touched 140 | - (IBAction)customIOS7dialogButtonTouchUpInside:(id)sender 141 | { 142 | if (delegate != NULL) { 143 | [delegate customIOS7dialogButtonTouchUpInside:self clickedButtonAtIndex:[sender tag]]; 144 | } 145 | 146 | if (onButtonTouchUpInside != NULL) { 147 | onButtonTouchUpInside(self, (int)[sender tag]); 148 | } 149 | } 150 | 151 | // Default button behaviour 152 | - (void)customIOS7dialogButtonTouchUpInside: (CustomIOSAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 153 | { 154 | NSLog(@"Button Clicked! %d, %d", (int)buttonIndex, (int)[alertView tag]); 155 | [self close]; 156 | } 157 | 158 | // Dialog close animation then cleaning and removing the view from the parent 159 | - (void)close 160 | { 161 | CATransform3D currentTransform = dialogView.layer.transform; 162 | 163 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) { 164 | CGFloat startRotation = [[dialogView valueForKeyPath:@"layer.transform.rotation.z"] floatValue]; 165 | CATransform3D rotation = CATransform3DMakeRotation(-startRotation + M_PI * 270.0 / 180.0, 0.0f, 0.0f, 0.0f); 166 | 167 | dialogView.layer.transform = CATransform3DConcat(rotation, CATransform3DMakeScale(1, 1, 1)); 168 | } 169 | 170 | dialogView.layer.opacity = 1.0f; 171 | 172 | [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone 173 | animations:^{ 174 | self.backgroundColor = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.0f]; 175 | dialogView.layer.transform = CATransform3DConcat(currentTransform, CATransform3DMakeScale(0.6f, 0.6f, 1.0)); 176 | dialogView.layer.opacity = 0.0f; 177 | } 178 | completion:^(BOOL finished) { 179 | for (UIView *v in [self subviews]) { 180 | [v removeFromSuperview]; 181 | } 182 | [self removeFromSuperview]; 183 | } 184 | ]; 185 | } 186 | 187 | - (void)setSubView: (UIView *)subView 188 | { 189 | containerView = subView; 190 | } 191 | 192 | // Creates the container view here: create the dialog, then add the custom content and buttons 193 | - (UIView *)createContainerView 194 | { 195 | if (containerView == NULL) { 196 | containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 150)]; 197 | } 198 | 199 | CGSize screenSize = [self countScreenSize]; 200 | CGSize dialogSize = [self countDialogSize]; 201 | 202 | // For the black background 203 | [self setFrame:CGRectMake(0, 0, screenSize.width, screenSize.height)]; 204 | 205 | // This is the dialog's container; we attach the custom content and the buttons to this one 206 | UIView *dialogContainer = [[UIView alloc] initWithFrame:CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height)]; 207 | 208 | // First, we style the dialog to match the iOS7 UIAlertView >>> 209 | CAGradientLayer *gradient = [CAGradientLayer layer]; 210 | gradient.frame = dialogContainer.bounds; 211 | gradient.colors = [NSArray arrayWithObjects: 212 | (id)[[UIColor colorWithRed:218.0/255.0 green:218.0/255.0 blue:218.0/255.0 alpha:1.0f] CGColor], 213 | (id)[[UIColor colorWithRed:233.0/255.0 green:233.0/255.0 blue:233.0/255.0 alpha:1.0f] CGColor], 214 | (id)[[UIColor colorWithRed:218.0/255.0 green:218.0/255.0 blue:218.0/255.0 alpha:1.0f] CGColor], 215 | nil]; 216 | 217 | CGFloat cornerRadius = kCustomIOSAlertViewCornerRadius; 218 | gradient.cornerRadius = cornerRadius; 219 | [dialogContainer.layer insertSublayer:gradient atIndex:0]; 220 | 221 | dialogContainer.layer.cornerRadius = cornerRadius; 222 | dialogContainer.layer.borderColor = [[UIColor colorWithRed:198.0/255.0 green:198.0/255.0 blue:198.0/255.0 alpha:1.0f] CGColor]; 223 | dialogContainer.layer.borderWidth = 1; 224 | dialogContainer.layer.shadowRadius = cornerRadius + 5; 225 | dialogContainer.layer.shadowOpacity = 0.1f; 226 | dialogContainer.layer.shadowOffset = CGSizeMake(0 - (cornerRadius+5)/2, 0 - (cornerRadius+5)/2); 227 | dialogContainer.layer.shadowColor = [UIColor blackColor].CGColor; 228 | dialogContainer.layer.shadowPath = [UIBezierPath bezierPathWithRoundedRect:dialogContainer.bounds cornerRadius:dialogContainer.layer.cornerRadius].CGPath; 229 | 230 | // There is a line above the button 231 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, dialogContainer.bounds.size.height - buttonHeight - buttonSpacerHeight, dialogContainer.bounds.size.width, buttonSpacerHeight)]; 232 | lineView.backgroundColor = [UIColor colorWithRed:198.0/255.0 green:198.0/255.0 blue:198.0/255.0 alpha:1.0f]; 233 | [dialogContainer addSubview:lineView]; 234 | // ^^^ 235 | 236 | // Add the custom container if there is any 237 | [dialogContainer addSubview:containerView]; 238 | 239 | // Add the buttons too 240 | [self addButtonsToView:dialogContainer]; 241 | 242 | return dialogContainer; 243 | } 244 | 245 | // Helper function: add buttons to container 246 | - (void)addButtonsToView: (UIView *)container 247 | { 248 | if (buttonTitles==NULL) { return; } 249 | 250 | CGFloat buttonWidth = container.bounds.size.width / [buttonTitles count]; 251 | 252 | for (int i=0; i<[buttonTitles count]; i++) { 253 | 254 | UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; 255 | 256 | [closeButton setFrame:CGRectMake(i * buttonWidth, container.bounds.size.height - buttonHeight, buttonWidth, buttonHeight)]; 257 | 258 | [closeButton addTarget:self action:@selector(customIOS7dialogButtonTouchUpInside:) forControlEvents:UIControlEventTouchUpInside]; 259 | [closeButton setTag:i]; 260 | 261 | [closeButton setTitle:[buttonTitles objectAtIndex:i] forState:UIControlStateNormal]; 262 | [closeButton setTitleColor:[UIColor colorWithRed:0.0f green:0.5f blue:1.0f alpha:1.0f] forState:UIControlStateNormal]; 263 | [closeButton setTitleColor:[UIColor colorWithRed:0.2f green:0.2f blue:0.2f alpha:0.5f] forState:UIControlStateHighlighted]; 264 | [closeButton.titleLabel setFont:[UIFont boldSystemFontOfSize:14.0f]]; 265 | [closeButton.layer setCornerRadius:kCustomIOSAlertViewCornerRadius]; 266 | 267 | [container addSubview:closeButton]; 268 | } 269 | } 270 | 271 | // Helper function: count and return the dialog's size 272 | - (CGSize)countDialogSize 273 | { 274 | CGFloat dialogWidth = containerView.frame.size.width; 275 | CGFloat dialogHeight = containerView.frame.size.height + buttonHeight + buttonSpacerHeight; 276 | 277 | return CGSizeMake(dialogWidth, dialogHeight); 278 | } 279 | 280 | // Helper function: count and return the screen's size 281 | - (CGSize)countScreenSize 282 | { 283 | if (buttonTitles!=NULL && [buttonTitles count] > 0) { 284 | buttonHeight = kCustomIOSAlertViewDefaultButtonHeight; 285 | buttonSpacerHeight = kCustomIOSAlertViewDefaultButtonSpacerHeight; 286 | } else { 287 | buttonHeight = 0; 288 | buttonSpacerHeight = 0; 289 | } 290 | 291 | CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; 292 | CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height; 293 | 294 | // On iOS7, screen width and height doesn't automatically follow orientation 295 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) { 296 | UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 297 | if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { 298 | CGFloat tmp = screenWidth; 299 | screenWidth = screenHeight; 300 | screenHeight = tmp; 301 | } 302 | } 303 | 304 | return CGSizeMake(screenWidth, screenHeight); 305 | } 306 | 307 | #if (defined(__IPHONE_7_0)) 308 | // Add motion effects 309 | - (void)applyMotionEffects { 310 | 311 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) { 312 | return; 313 | } 314 | 315 | UIInterpolatingMotionEffect *horizontalEffect = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" 316 | type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; 317 | horizontalEffect.minimumRelativeValue = @(-kCustomIOS7MotionEffectExtent); 318 | horizontalEffect.maximumRelativeValue = @( kCustomIOS7MotionEffectExtent); 319 | 320 | UIInterpolatingMotionEffect *verticalEffect = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" 321 | type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; 322 | verticalEffect.minimumRelativeValue = @(-kCustomIOS7MotionEffectExtent); 323 | verticalEffect.maximumRelativeValue = @( kCustomIOS7MotionEffectExtent); 324 | 325 | UIMotionEffectGroup *motionEffectGroup = [[UIMotionEffectGroup alloc] init]; 326 | motionEffectGroup.motionEffects = @[horizontalEffect, verticalEffect]; 327 | 328 | [dialogView addMotionEffect:motionEffectGroup]; 329 | } 330 | #endif 331 | 332 | - (void)dealloc 333 | { 334 | [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; 335 | 336 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil]; 337 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil]; 338 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil]; 339 | } 340 | 341 | // Rotation changed, on iOS7 342 | - (void)changeOrientationForIOS7 { 343 | 344 | UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 345 | 346 | CGFloat startRotation = [[self valueForKeyPath:@"layer.transform.rotation.z"] floatValue]; 347 | CGAffineTransform rotation; 348 | 349 | switch (interfaceOrientation) { 350 | case UIInterfaceOrientationLandscapeLeft: 351 | rotation = CGAffineTransformMakeRotation(-startRotation + M_PI * 270.0 / 180.0); 352 | break; 353 | 354 | case UIInterfaceOrientationLandscapeRight: 355 | rotation = CGAffineTransformMakeRotation(-startRotation + M_PI * 90.0 / 180.0); 356 | break; 357 | 358 | case UIInterfaceOrientationPortraitUpsideDown: 359 | rotation = CGAffineTransformMakeRotation(-startRotation + M_PI * 180.0 / 180.0); 360 | break; 361 | 362 | default: 363 | rotation = CGAffineTransformMakeRotation(-startRotation + 0.0); 364 | break; 365 | } 366 | 367 | [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone 368 | animations:^{ 369 | dialogView.transform = rotation; 370 | 371 | } 372 | completion:nil 373 | ]; 374 | 375 | } 376 | 377 | // Rotation changed, on iOS8 378 | - (void)changeOrientationForIOS8: (NSNotification *)notification { 379 | 380 | CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; 381 | CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height; 382 | 383 | [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone 384 | animations:^{ 385 | CGSize dialogSize = [self countDialogSize]; 386 | CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; 387 | self.frame = CGRectMake(0, 0, screenWidth, screenHeight); 388 | dialogView.frame = CGRectMake((screenWidth - dialogSize.width) / 2, (screenHeight - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height); 389 | } 390 | completion:nil 391 | ]; 392 | 393 | 394 | } 395 | 396 | // Handle device orientation changes 397 | - (void)deviceOrientationDidChange: (NSNotification *)notification 398 | { 399 | // If dialog is attached to the parent view, it probably wants to handle the orientation change itself 400 | if (parentView != NULL) { 401 | return; 402 | } 403 | 404 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) { 405 | [self changeOrientationForIOS7]; 406 | } else { 407 | [self changeOrientationForIOS8:notification]; 408 | } 409 | } 410 | 411 | // Handle keyboard show/hide changes 412 | - (void)keyboardWillShow: (NSNotification *)notification 413 | { 414 | CGSize screenSize = [self countScreenSize]; 415 | CGSize dialogSize = [self countDialogSize]; 416 | CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; 417 | 418 | UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; 419 | if (UIInterfaceOrientationIsLandscape(interfaceOrientation) && NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1) { 420 | CGFloat tmp = keyboardSize.height; 421 | keyboardSize.height = keyboardSize.width; 422 | keyboardSize.width = tmp; 423 | } 424 | 425 | [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone 426 | animations:^{ 427 | dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height); 428 | } 429 | completion:nil 430 | ]; 431 | } 432 | 433 | - (void)keyboardWillHide: (NSNotification *)notification 434 | { 435 | CGSize screenSize = [self countScreenSize]; 436 | CGSize dialogSize = [self countDialogSize]; 437 | 438 | [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone 439 | animations:^{ 440 | dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height); 441 | } 442 | completion:nil 443 | ]; 444 | } 445 | 446 | @end 447 | -------------------------------------------------------------------------------- /iFiles/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /iFiles/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | { 14 | 15 | IBOutlet UILabel *deviceLabel; 16 | } 17 | 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /iFiles/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "sys/utsname.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | 22 | struct utsname systemInfo; 23 | uname(&systemInfo); 24 | 25 | NSString *device = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; 26 | NSString *vers = [[UIDevice currentDevice]systemVersion]; 27 | 28 | NSString *full = [NSString stringWithFormat:@"%@%@%@%@",@"This device is: ",device,@" ",vers]; 29 | deviceLabel.text = full; 30 | 31 | } 32 | 33 | - (void)didReceiveMemoryWarning { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /iFiles/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // iFiles 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /iFilesTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /iFilesTests/iFilesTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // iFilesTests.m 3 | // iFilesTests 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface iFilesTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation iFilesTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /iFilesUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /iFilesUITests/iFilesUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // iFilesUITests.m 3 | // iFilesUITests 4 | // 5 | // Created by Billy Ellis on 21/01/2016. 6 | // Copyright © 2016 Billy Ellis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface iFilesUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation iFilesUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------