Skip to content

Commit

Permalink
Add some links and some settings that don’t work
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Sep 24, 2018
1 parent a7bf2c2 commit 05caab6
Show file tree
Hide file tree
Showing 10 changed files with 345 additions and 36 deletions.
229 changes: 199 additions & 30 deletions app/About.storyboard

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions app/AboutViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// AboutViewController.h
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface AboutViewController : UITableViewController

@end

NS_ASSUME_NONNULL_END
40 changes: 40 additions & 0 deletions app/AboutViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//
// AboutViewController.m
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//

#import "UIApplication+OpenURL.h"
#import "AboutViewController.h"

@interface AboutViewController ()
@property (weak, nonatomic) IBOutlet UITableViewCell *sendFeedback;
@property (weak, nonatomic) IBOutlet UITableViewCell *openGithub;
@property (weak, nonatomic) IBOutlet UITableViewCell *openTwitter;

@end

@implementation AboutViewController

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

- (IBAction)openLink:(id)sender {

}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
if (cell == self.sendFeedback) {
[UIApplication openURL:@"mailto:tblodt@icloud.com"];
} else if (cell == self.openGithub) {
[UIApplication openURL:@"https://github.com/tbodt/ish"];
} else if (cell == self.openTwitter) {
[UIApplication openURL:@"https://twitter.com/tblodt"];
}
}

@end
16 changes: 16 additions & 0 deletions app/DismissSegue.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// DismissSegue.h
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface DismissSegue : UIStoryboardSegue

@end

NS_ASSUME_NONNULL_END
16 changes: 16 additions & 0 deletions app/DismissSegue.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// DismissSegue.m
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//

#import "DismissSegue.h"

@implementation DismissSegue

- (void)perform {
[self.sourceViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}

@end
18 changes: 18 additions & 0 deletions app/UIApplication+OpenURL.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// UIApplication+OpenURL.h
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIApplication (OpenURL)

+ (void)openURL:(NSString *)url;

@end

NS_ASSUME_NONNULL_END
16 changes: 16 additions & 0 deletions app/UIApplication+OpenURL.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// UIApplication+OpenURL.m
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//

#import "UIApplication+OpenURL.h"

@implementation UIApplication (OpenURL)

+ (void)openURL:(NSString *)url {
[[self sharedApplication] openURL:[NSURL URLWithString:url] options:@{} completionHandler:nil];
}

@end
6 changes: 3 additions & 3 deletions app/UIViewController+Back.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIViewController+Back.h
// UIViewController+Unwind.h
// iSH
//
// Created by Theodore Dubois on 9/23/18.
Expand All @@ -9,9 +9,9 @@

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (Back)
@interface UIViewController (Unwind)

- (IBAction)back:(UIStoryboardSegue *)segue;
- (IBAction)unwind:(UIStoryboardSegue *)segue;

@end

Expand Down
6 changes: 3 additions & 3 deletions app/UIViewController+Back.m
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//
// UIViewController+Back.m
// UIViewController+Unwind.m
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//

#import "UIViewController+Back.h"

@implementation UIViewController (Back)
@implementation UIViewController (Unwind)

- (IBAction)back:(UIStoryboardSegue *)segue {
- (IBAction)unwind:(UIStoryboardSegue *)segue {
}

@end
18 changes: 18 additions & 0 deletions iSH.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
BBFB55662158644C00DFE6DE /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BBFB55652158644C00DFE6DE /* libresolv.tbd */; };
BBFB556A215868E800DFE6DE /* About.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BBFB5569215868E800DFE6DE /* About.storyboard */; };
BBFB557121586C4800DFE6DE /* UIViewController+Back.m in Sources */ = {isa = PBXBuildFile; fileRef = BBFB557021586C4800DFE6DE /* UIViewController+Back.m */; };
BBFB557621586F9200DFE6DE /* DismissSegue.m in Sources */ = {isa = PBXBuildFile; fileRef = BBFB557521586F9200DFE6DE /* DismissSegue.m */; };
BBFB5579215876CD00DFE6DE /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BBFB5578215876CD00DFE6DE /* AboutViewController.m */; };
BBFB557C215878C600DFE6DE /* UIApplication+OpenURL.m in Sources */ = {isa = PBXBuildFile; fileRef = BBFB557B215878C600DFE6DE /* UIApplication+OpenURL.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -253,6 +256,12 @@
BBFB5569215868E800DFE6DE /* About.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = About.storyboard; sourceTree = "<group>"; };
BBFB556F21586C4800DFE6DE /* UIViewController+Back.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Back.h"; sourceTree = "<group>"; };
BBFB557021586C4800DFE6DE /* UIViewController+Back.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Back.m"; sourceTree = "<group>"; };
BBFB557421586F9200DFE6DE /* DismissSegue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DismissSegue.h; sourceTree = "<group>"; };
BBFB557521586F9200DFE6DE /* DismissSegue.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DismissSegue.m; sourceTree = "<group>"; };
BBFB5577215876CD00DFE6DE /* AboutViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = "<group>"; };
BBFB5578215876CD00DFE6DE /* AboutViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = "<group>"; };
BBFB557A215878C600DFE6DE /* UIApplication+OpenURL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIApplication+OpenURL.h"; sourceTree = "<group>"; };
BBFB557B215878C600DFE6DE /* UIApplication+OpenURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIApplication+OpenURL.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -584,6 +593,10 @@
BB455E101FB37F6600AFB48B /* DelayedUITask.m */,
BBFB556F21586C4800DFE6DE /* UIViewController+Back.h */,
BBFB557021586C4800DFE6DE /* UIViewController+Back.m */,
BBFB557A215878C600DFE6DE /* UIApplication+OpenURL.h */,
BBFB557B215878C600DFE6DE /* UIApplication+OpenURL.m */,
BBFB557421586F9200DFE6DE /* DismissSegue.h */,
BBFB557521586F9200DFE6DE /* DismissSegue.m */,
);
name = Utilities;
sourceTree = "<group>";
Expand All @@ -592,6 +605,8 @@
isa = PBXGroup;
children = (
BBFB5569215868E800DFE6DE /* About.storyboard */,
BBFB5577215876CD00DFE6DE /* AboutViewController.h */,
BBFB5578215876CD00DFE6DE /* AboutViewController.m */,
);
name = About;
sourceTree = "<group>";
Expand Down Expand Up @@ -890,11 +905,14 @@
files = (
BB792B581F96D90D00FFB7A4 /* TerminalViewController.m in Sources */,
BB78AB2B1FAD22440013E782 /* TerminalView.m in Sources */,
BBFB557621586F9200DFE6DE /* DismissSegue.m in Sources */,
BB829FE72158247100794F96 /* BarViewController.m in Sources */,
BB455E111FB37F6600AFB48B /* DelayedUITask.m in Sources */,
BB0FC5921F980A6C00803272 /* Terminal.m in Sources */,
BB792B631F96D90D00FFB7A4 /* main.m in Sources */,
BB60F55221573FCA003A4E52 /* BarButton.m in Sources */,
BBFB557C215878C600DFE6DE /* UIApplication+OpenURL.m in Sources */,
BBFB5579215876CD00DFE6DE /* AboutViewController.m in Sources */,
BBFB557121586C4800DFE6DE /* UIViewController+Back.m in Sources */,
BB792B551F96D90D00FFB7A4 /* AppDelegate.m in Sources */,
);
Expand Down

0 comments on commit 05caab6

Please sign in to comment.