Skip to content

Commit

Permalink
Added support for all iOS device sizes & slightly prettier interface
Browse files Browse the repository at this point in the history
Converted icons to use Asset Catalog
Added Launch Screen file and removed default images
Added support for iPhone 6/6 Plus sizes, iPad Pro, and iPad split screen
Updated version number to 1.7
Switched name of project to 'Tethering' since that's what we're calling
it
Updated TableView class to use modern paradigms
Updated the storyboard to use UINavigationController and modern
paradigms (can more easily add functionality now)
Updated interface to "flat" to align with newer versions of iOS
Added button to open the GitHub wiki for additional configuration
information if needed
  • Loading branch information
rickybloomfield committed Aug 14, 2016
1 parent a5379c5 commit c404a85
Show file tree
Hide file tree
Showing 28 changed files with 471 additions and 311 deletions.
5 changes: 4 additions & 1 deletion AncillaryCode/AppDelegate.mm
Expand Up @@ -86,8 +86,11 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application

[self.window addSubview:self.viewController.view];

[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0.082 green:0.492 blue:0.980 alpha:1.0]];
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:20 weight:UIFontWeightLight], NSFontAttributeName, [UIColor whiteColor], NSForegroundColorAttributeName, nil];
[[UINavigationBar appearance] setTitleTextAttributes:attributes];

[self.window makeKeyAndVisible];
[self.window makeKeyAndVisible];
}

- (void)applicationWillTerminate:(UIApplication *)application
Expand Down
22 changes: 11 additions & 11 deletions MOGlassButton.mm
Expand Up @@ -54,7 +54,7 @@ - (id)initWithFrame:(CGRect)aRect {

- (void)awakeFromNib {
[super awakeFromNib];
[self setupLayers];
//[self setupLayers];
}


Expand All @@ -63,19 +63,19 @@ - (void)awakeFromNib {
- (void)layoutSubviews {
[super layoutSubviews];

gradientLayer1.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height/2);
gradientLayer2.frame = CGRectMake(0, self.frame.size.height/2, self.frame.size.width, self.frame.size.height/2);
outlineLayer.frame = CGRectMake(0, 1, self.frame.size.width, self.frame.size.height);
//gradientLayer1.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height/2);
//gradientLayer2.frame = CGRectMake(0, self.frame.size.height/2, self.frame.size.width, self.frame.size.height/2);
//outlineLayer.frame = CGRectMake(0, 1, self.frame.size.width, self.frame.size.height);
}

#pragma mark Default Button Background Colors

- (void)setupForStandardButtons {
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[self setTitleColor:[UIColor colorFromRGBIntegers:205 green:212 blue:220 alpha:1.0f] forState:UIControlStateDisabled];
self.titleLabel.shadowOffset = CGSizeMake(0, -1);
self.titleLabel.shadowColor = [UIColor colorFromRGBIntegers:192 green:73 blue:84 alpha:1.0f];
self.titleLabel.font = [UIFont boldSystemFontOfSize:20];
//self.titleLabel.shadowOffset = CGSizeMake(0, -1);
//self.titleLabel.shadowColor = [UIColor colorFromRGBIntegers:192 green:73 blue:84 alpha:1.0f];
self.titleLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightLight];
}


Expand Down Expand Up @@ -104,15 +104,15 @@ - (void)setupAsWhiteButton {

- (void)setupAsSmallGreenButton {
[self setupAsGreenButton];
self.titleLabel.font = [UIFont boldSystemFontOfSize:15];
self.layer.cornerRadius = 4.0f;
self.titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightLight];
//self.layer.cornerRadius = 4.0f;
}


- (void)setupAsSmallRedButton {
[self setupAsRedButton];
self.titleLabel.font = [UIFont boldSystemFontOfSize:15];
self.layer.cornerRadius = 4.0f;
self.titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightLight];
//self.layer.cornerRadius = 4.0f;
}

@end
125 changes: 75 additions & 50 deletions Main.storyboard
@@ -1,61 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="lhN-Y1-Fyv">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="56O-SV-yia">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Socks Proxy Controller-->
<scene sceneID="0jL-Ob-q5N">
<!--Tethering-->
<scene sceneID="gQ2-oy-HAU">
<objects>
<viewController id="lhN-Y1-Fyv" customClass="SocksProxyController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="kYQ-LT-e4B"/>
<viewControllerLayoutGuide type="bottom" id="OuB-0y-heo"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Gk5-SX-GYs">
<tableViewController id="Mqm-IH-k31" userLabel="Tethering" customClass="SocksProxyController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="YEt-2y-us4">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="grouped" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="13c-uX-qMh">
<rect key="frame" x="0.0" y="20" width="320" height="462"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<sections/>
<connections>
<outlet property="dataSource" destination="lhN-Y1-Fyv" id="uaF-6b-xZb"/>
<outlet property="delegate" destination="lhN-Y1-Fyv" id="HIN-Et-z1F"/>
</connections>
</tableView>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TBt-BL-WFG" customClass="MOGlassButton">
<rect key="frame" x="10" y="488" width="93" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
<state key="normal" title="Start">
<color key="titleShadowColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="startOrStopAction:" destination="lhN-Y1-Fyv" eventType="touchUpInside" id="Qwq-ru-AW4"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<toolbar key="tableFooterView" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="gcd-si-QUh">
<rect key="frame" x="0.0" y="175.5" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<items>
<barButtonItem style="plain" systemItem="flexibleSpace" id="tpn-da-7o1"/>
<barButtonItem style="plain" id="flS-Za-8to">
<button key="customView" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="TBt-BL-WFG" customClass="MOGlassButton">
<rect key="frame" x="-656" y="0.0" width="1631" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
<state key="normal" title="Start">
<color key="titleShadowColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="startOrStopAction:" destination="Mqm-IH-k31" eventType="touchUpInside" id="blr-5J-HYg"/>
</connections>
</button>
</barButtonItem>
<barButtonItem style="plain" systemItem="flexibleSpace" id="ufA-NW-M8U"/>
</items>
<color key="barTintColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
</toolbar>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="prototypeCell" id="IIx-kX-MDj">
<rect key="frame" x="0.0" y="113.5" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="IIx-kX-MDj" id="3TG-gR-Q9U">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="Mqm-IH-k31" id="ExX-19-14c"/>
<outlet property="delegate" destination="Mqm-IH-k31" id="vR0-KD-Yu9"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Root View Controller" id="MHt-Ta-ETf"/>
<connections>
<outlet property="proxyTableView" destination="13c-uX-qMh" id="PrZ-5I-vXr"/>
<outlet property="startOrStopButton" destination="TBt-BL-WFG" id="YWp-SG-YjR"/>
<outlet property="proxyTableView" destination="YEt-2y-us4" id="DYP-Z0-C9H"/>
<outlet property="startOrStopButton" destination="TBt-BL-WFG" id="uvl-9u-Ika"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ZWE-nw-zuN" userLabel="First Responder" sceneMemberID="firstResponder"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="mZW-Do-ag9" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="335" y="171"/>
<point key="canvasLocation" x="716" y="653"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="ltH-hv-U8D">
<objects>
<navigationController id="56O-SV-yia" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="cho-Lc-87j">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<textAttributes key="titleTextAttributes">
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</textAttributes>
</navigationBar>
<connections>
<segue destination="Mqm-IH-k31" kind="relationship" relationship="rootViewController" id="0pB-nh-QOk"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Afd-zk-80n" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="176" y="653"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
</document>
86 changes: 86 additions & 0 deletions Resources/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,86 @@
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-Spotlight-40@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-Spotlight-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-Small.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-Spotlight-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-Spotlight-40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-iPadPro@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Images.xcassets/Contents.json
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
24 changes: 18 additions & 6 deletions Resources/Info.plist
Expand Up @@ -8,11 +8,8 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFiles</key>
<array>
<string>icon@2x.png</string>
<string>icon.png</string>
</array>
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -21,19 +18,34 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1.7</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

0 comments on commit c404a85

Please sign in to comment.